Changeset 12726 in josm for trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/AddWayHandler.java
- Timestamp:
- 2017-09-04T23:45:49+02:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/AddWayHandler.java
r12641 r12726 19 19 import org.openstreetmap.josm.command.SequenceCommand; 20 20 import org.openstreetmap.josm.data.coor.LatLon; 21 import org.openstreetmap.josm.data.osm.DataSet; 21 22 import org.openstreetmap.josm.data.osm.Node; 22 23 import org.openstreetmap.josm.data.osm.OsmPrimitive; … … 148 149 nd = new Node(ll); 149 150 // Now execute the commands to add this node. 150 commands.add(new AddCommand( nd));151 commands.add(new AddCommand(Main.main.getEditDataSet(), nd)); 151 152 addedNodes.put(ll, nd); 152 153 } … … 166 167 } 167 168 allCoordinates.clear(); 168 commands.add(new AddCommand(way)); 169 DataSet ds = MainApplication.getLayerManager().getEditDataSet(); 170 commands.add(new AddCommand(ds, way)); 169 171 MainApplication.undoRedo.add(new SequenceCommand(tr("Add way"), commands)); 170 MainApplication.getLayerManager().getEditDataSet().setSelected(way);172 ds.setSelected(way); 171 173 if (PermissionPrefWithDefault.CHANGE_VIEWPORT.isAllowed()) { 172 174 AutoScaleAction.autoScale("selection");
Note:
See TracChangeset
for help on using the changeset viewer.