Ignore:
Timestamp:
2017-09-04T23:45:49+02:00 (7 years ago)
Author:
Don-vip
Message:

see #13036 - deprecate Command() default constructor, fix unit tests and java warnings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/AddWayHandler.java

    r12641 r12726  
    1919import org.openstreetmap.josm.command.SequenceCommand;
    2020import org.openstreetmap.josm.data.coor.LatLon;
     21import org.openstreetmap.josm.data.osm.DataSet;
    2122import org.openstreetmap.josm.data.osm.Node;
    2223import org.openstreetmap.josm.data.osm.OsmPrimitive;
     
    148149            nd = new Node(ll);
    149150            // Now execute the commands to add this node.
    150             commands.add(new AddCommand(nd));
     151            commands.add(new AddCommand(Main.main.getEditDataSet(), nd));
    151152            addedNodes.put(ll, nd);
    152153        }
     
    166167        }
    167168        allCoordinates.clear();
    168         commands.add(new AddCommand(way));
     169        DataSet ds = MainApplication.getLayerManager().getEditDataSet();
     170        commands.add(new AddCommand(ds, way));
    169171        MainApplication.undoRedo.add(new SequenceCommand(tr("Add way"), commands));
    170         MainApplication.getLayerManager().getEditDataSet().setSelected(way);
     172        ds.setSelected(way);
    171173        if (PermissionPrefWithDefault.CHANGE_VIEWPORT.isAllowed()) {
    172174            AutoScaleAction.autoScale("selection");
Note: See TracChangeset for help on using the changeset viewer.