Changeset 14542 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2018-12-09T23:58:32+01:00 (6 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/actions
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/CreateCircleAction.java
r14397 r14542 130 130 if (!isEnabled()) 131 131 return; 132 133 DataSet ds = getLayerManager().getEditDataSet(); 132 runOn(getLayerManager().getEditDataSet()); 133 } 134 135 /** 136 * Run the action on the given dataset. 137 * @param ds dataset 138 * @since 14542 139 */ 140 public static void runOn(DataSet ds) { 134 141 Collection<OsmPrimitive> sel = ds.getSelected(); 135 142 List<Node> nodes = OsmPrimitive.getFilteredList(sel, Node.class); -
trunk/src/org/openstreetmap/josm/actions/SplitWayAction.java
r14397 r14542 26 26 import org.openstreetmap.josm.command.SplitWayCommand; 27 27 import org.openstreetmap.josm.data.UndoRedoHandler; 28 import org.openstreetmap.josm.data.osm.DataSet; 28 29 import org.openstreetmap.josm.data.osm.DefaultNameFormatter; 29 30 import org.openstreetmap.josm.data.osm.Node; … … 66 67 @Override 67 68 public void actionPerformed(ActionEvent e) { 69 runOn(getLayerManager().getEditDataSet()); 70 } 71 72 /** 73 * Run the action on the given dataset. 74 * @param ds dataset 75 * @since 14542 76 */ 77 public static void runOn(DataSet ds) { 68 78 69 79 if (SegmentToKeepSelectionDialog.DISPLAY_COUNT.get() > 0) { … … 73 83 } 74 84 75 Collection<OsmPrimitive> selection = getLayerManager().getEditDataSet().getSelected();85 Collection<OsmPrimitive> selection = ds.getSelected(); 76 86 77 87 List<Node> selectedNodes = OsmPrimitive.getFilteredList(selection, Node.class); … … 284 294 List<? extends PrimitiveId> newSel = result.getNewSelection(); 285 295 if (newSel != null && !newSel.isEmpty()) { 286 MainApplication.getLayerManager().getEditDataSet().setSelected(newSel);296 way.getDataSet().setSelected(newSel); 287 297 } 288 298 }
Note:
See TracChangeset
for help on using the changeset viewer.