- Timestamp:
- 2009-10-13T05:04:53+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
r2279 r2282 270 270 public void setSelected(Collection<? extends OsmPrimitive> selection) { 271 271 setSelected(selection, true /* fire selection change event */); 272 } 273 274 /** 275 * Adds the primitives in <code>selection</code> to the current selection 276 * and notifies all {@see SelectionChangedListener}. 277 * 278 * @param selection the selection 279 */ 280 public void addSelected(Collection<? extends OsmPrimitive> selection) { 281 addSelected(selection, true /* fire selection change event */); 282 } 283 284 /** 285 * Adds the primitives in <code>selection</code> to the current selection. 286 * Notifies all {@see SelectionChangedListener} if <code>fireSelectionChangeEvent</code> is true. 287 * 288 * @param selection the selection 289 * @param fireSelectionChangeEvent true, if the selection change listeners are to be notified; false, otherwise 290 */ 291 public void addSelected(Collection<? extends OsmPrimitive> selection, boolean fireSelectionChangeEvent) { 292 for (OsmPrimitive osm : selection) { 293 osm.setSelected(true); 294 } 295 if (fireSelectionChangeEvent) { 296 fireSelectionChanged(selection); 297 } 272 298 } 273 299 -
trunk/src/org/openstreetmap/josm/data/osm/visitor/MapPaintVisitor.java
r2279 r2282 476 476 w.setNodes(n); 477 477 if (selected) { 478 data. setSelected(Collections.singleton(w),false /* don't notify listeners */);478 data.addSelected(Collections.singleton(w),false /* don't notify listeners */); 479 479 } else { 480 480 data.clearSelection(w);
Note:
See TracChangeset
for help on using the changeset viewer.