Changeset 297 in josm
- Timestamp:
- 2007-07-27T10:50:54+02:00 (17 years ago)
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
src/org/openstreetmap/josm/actions/UnselectAllAction.java
r181 r297 15 15 16 16 public void actionPerformed(ActionEvent e) { 17 Main.ds. clearSelection();17 Main.ds.setSelected(); 18 18 } 19 19 } -
src/org/openstreetmap/josm/data/osm/DataSet.java
r290 r297 82 82 /** 83 83 * Remove the selection of the whole dataset. 84 * @deprecated Use setSelected() instead. 84 85 */ 86 @Deprecated 85 87 public void clearSelection() { 86 88 clearSelection(nodes); … … 103 105 104 106 public void setSelected(Collection<? extends OsmPrimitive> selection) { 105 clearSelection(); 107 clearSelection(nodes); 108 clearSelection(segments); 109 clearSelection(ways); 106 110 for (OsmPrimitive osm : selection) 107 111 osm.selected = true; … … 110 114 111 115 public void setSelected(OsmPrimitive... osm) { 112 clearSelection();113 if (osm.length == 0 || (osm.length == 1 && osm[0] == null))116 if (osm.length == 1 && osm[0] == null) { 117 setSelected(); 114 118 return; 119 } 120 clearSelection(nodes); 121 clearSelection(segments); 122 clearSelection(ways); 115 123 for (OsmPrimitive o : osm) 116 o.selected = true; 124 if (o != null) 125 o.selected = true; 117 126 fireSelectionChanged(Arrays.asList(osm)); 118 127 } -
src/org/openstreetmap/josm/gui/MapView.java
r290 r297 132 132 if (layer == editLayer) { 133 133 editLayer = null; 134 Main.ds. clearSelection();134 Main.ds.setSelected(); 135 135 } 136 136 layer.destroy(); -
src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java
r290 r297 230 230 redoCommands.push(c); 231 231 setModified(uploadedModified || !commands.isEmpty()); 232 Main.ds. clearSelection();232 Main.ds.setSelected(); 233 233 fireCommandsChanged(); 234 234 } -
test/unit/org/openstreetmap/josm/data/osm/DataSetTest.java
r290 r297 46 46 } 47 47 48 public void testClearSelection() {49 node1.selected = true;50 ds.clearSelection();51 assertFalse(node1.selected);52 }53 54 48 public void testGetSelected() { 55 49 node1.selected = true;
Note:
See TracChangeset
for help on using the changeset viewer.