Changeset 2279 in josm
- Timestamp:
- 2009-10-12T20:39:13+02:00 (15 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/data/osm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/DataSet.java
r2265 r2279 243 243 } 244 244 245 public void setSelected(Collection<? extends OsmPrimitive> selection) { 245 /** 246 * Sets the current selection to the primitives in <code>selection</code>. 247 * Notifies all {@see SelectionChangedListener} if <code>fireSelectionChangeEvent</code> is true. 248 * 249 * @param selection the selection 250 * @param fireSelectionChangeEvent true, if the selection change listeners are to be notified; false, otherwise 251 */ 252 public void setSelected(Collection<? extends OsmPrimitive> selection, boolean fireSelectionChangeEvent) { 246 253 clearSelection(nodes); 247 254 clearSelection(ways); … … 250 257 osm.setSelected(true); 251 258 } 252 fireSelectionChanged(selection); 253 } 259 if (fireSelectionChangeEvent) { 260 fireSelectionChanged(selection); 261 } 262 } 263 264 /** 265 * Sets the current selection to the primitives in <code>selection</code> 266 * and notifies all {@see SelectionChangedListener}. 267 * 268 * @param selection the selection 269 */ 270 public void setSelected(Collection<? extends OsmPrimitive> selection) { 271 setSelected(selection, true /* fire selection change event */); 272 } 273 254 274 255 275 public void setSelected(OsmPrimitive... osm) { -
trunk/src/org/openstreetmap/josm/data/osm/visitor/MapPaintVisitor.java
r2264 r2279 19 19 import java.util.Arrays; 20 20 import java.util.Collection; 21 import java.util.Collections; 21 22 import java.util.Iterator; 22 23 import java.util.LinkedList; … … 474 475 w = new Way(w); 475 476 w.setNodes(n); 476 if (selected) 477 data.setSelected( w);478 else477 if (selected) { 478 data.setSelected(Collections.singleton(w),false /* don't notify listeners */); 479 } else { 479 480 data.clearSelection(w); 481 } 480 482 } 481 483 if(!w.isClosed()) … … 680 682 firstNode = lastNode; 681 683 lastNode = firstNode; 682 } 683 else 684 } else { 684 685 onewayvia = OsmUtils.getOsmBoolean(onewayviastr); 686 } 685 687 } 686 688
Note:
See TracChangeset
for help on using the changeset viewer.