Changeset 13955 in josm
- Timestamp:
- 2018-06-18T20:14:01+02:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/AutoScaleAction.java
r13926 r13955 30 30 import org.openstreetmap.josm.data.osm.OsmPrimitive; 31 31 import org.openstreetmap.josm.data.osm.visitor.BoundingXYVisitor; 32 import org.openstreetmap.josm.data.osm.visitor.PrimitiveVisitor;33 32 import org.openstreetmap.josm.data.validation.TestError; 34 33 import org.openstreetmap.josm.gui.MainApplication; … … 287 286 288 287 private BoundingXYVisitor modeSelectionOrConflict(BoundingXYVisitor v) { 289 Collection< OsmPrimitive> sel = new HashSet<>();288 Collection<IPrimitive> sel = new HashSet<>(); 290 289 if ("selection".equals(mode)) { 291 DataSetdataSet = getLayerManager().getActiveDataSet();290 OsmData<?, ?, ?, ?> dataSet = getLayerManager().getActiveData(); 292 291 if (dataSet != null) { 293 sel =dataSet.getSelected();292 sel.addAll(dataSet.getSelected()); 294 293 } 295 294 } else { 296 295 ConflictDialog conflictDialog = MainApplication.getMap().conflictDialog; 297 Conflict<? extends OsmPrimitive> c = conflictDialog.getSelectedConflict();296 Conflict<? extends IPrimitive> c = conflictDialog.getSelectedConflict(); 298 297 if (c != null) { 299 298 sel.add(c.getMy()); 300 299 } else if (conflictDialog.getConflicts() != null) { 301 sel =conflictDialog.getConflicts().getMyConflictParties();300 sel.addAll(conflictDialog.getConflicts().getMyConflictParties()); 302 301 } 303 302 } … … 310 309 return null; 311 310 } 312 for ( OsmPrimitive osm : sel) {313 osm.accept( (PrimitiveVisitor)v);311 for (IPrimitive osm : sel) { 312 osm.accept(v); 314 313 } 315 314
Note:
See TracChangeset
for help on using the changeset viewer.