Changeset 29 in josm for src/org/openstreetmap/josm/gui
- Timestamp:
- 2005-12-02T07:40:16+01:00 (19 years ago)
- Location:
- src/org/openstreetmap/josm/gui
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/org/openstreetmap/josm/gui/MapView.java
r24 r29 141 141 for (LayerChangeListener l : listeners) 142 142 l.layerRemoved(layer); 143 if (layer == editLayer) 144 editLayer = null; 143 145 } 144 146 -
src/org/openstreetmap/josm/gui/dialogs/LayerList.java
r23 r29 24 24 25 25 import org.openstreetmap.josm.Main; 26 import org.openstreetmap.josm.data.osm.DataSet; 26 27 import org.openstreetmap.josm.gui.ImageProvider; 27 28 import org.openstreetmap.josm.gui.MapFrame; … … 154 155 if (model.size() == 1) { 155 156 Main.main.setMapFrame(null, null); 157 Main.main.ds = new DataSet(); 156 158 } else { 157 159 int sel = layers.getSelectedIndex(); -
src/org/openstreetmap/josm/gui/dialogs/PropertiesDialog.java
r28 r29 13 13 import java.awt.event.WindowFocusListener; 14 14 import java.util.Collection; 15 import java.util.HashMap; 15 16 import java.util.Iterator; 16 17 import java.util.TreeMap; … … 292 293 data.setRowCount(0); 293 294 TreeMap<String, Collection<String>> props = new TreeMap<String, Collection<String>>(); 295 HashMap<String, Integer> valueCounts = new HashMap<String, Integer>(); 294 296 for (OsmPrimitive osm : newSelection) { 295 297 if (osm.keys != null) { … … 301 303 } 302 304 value.add(e.getValue()); 305 306 Integer count = valueCounts.get(e.getValue()); 307 if (count == null) 308 count = 0; 309 valueCounts.put(e.getValue(), count+1); 303 310 } 304 311 } 305 312 } 313 int selCount = newSelection.size(); 306 314 for (Entry<String, Collection<String>> e : props.entrySet()) { 307 315 JComboBox value = new JComboBox(e.getValue().toArray()); 308 316 value.setEditable(true); 309 if (e.getValue().size() > 1 )317 if (e.getValue().size() > 1 || valueCounts.get(e.getValue().iterator().next()) != selCount) 310 318 value.getEditor().setItem("<different>"); 311 319 data.addRow(new Object[]{e.getKey(), value}); -
src/org/openstreetmap/josm/gui/layer/EditLayer.java
r23 r29 42 42 * All commands that were made on the dataset. 43 43 */ 44 public Collection<Command> commands = new LinkedList<Command>();44 public LinkedList<Command> commands = new LinkedList<Command>(); 45 45 46 46 /**
Note:
See TracChangeset
for help on using the changeset viewer.