Changeset 33844 in osm for applications


Ignore:
Timestamp:
2017-11-21T01:18:27+01:00 (7 years ago)
Author:
donvip
Message:

update to JOSM 12987

Location:
applications/editors/josm/plugins/splinex
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/splinex/build.xml

    r33534 r33844  
    55    <property name="commit.message" value="Commit message"/>
    66    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    7     <property name="plugin.main.version" value="12663"/>
     7    <property name="plugin.main.version" value="12987"/>
    88
    99    <!-- Configure these properties (replace "..." accordingly).
  • applications/editors/josm/plugins/splinex/src/org/openstreetmap/josm/plugins/Splinex/DrawSplineAction.java

    r33534 r33844  
    2828import org.openstreetmap.josm.data.osm.OsmPrimitive;
    2929import org.openstreetmap.josm.data.osm.visitor.paint.MapPaintSettings;
    30 import org.openstreetmap.josm.data.preferences.ColorProperty;
     30import org.openstreetmap.josm.data.preferences.NamedColorProperty;
    3131import org.openstreetmap.josm.gui.MainApplication;
    3232import org.openstreetmap.josm.gui.MapFrame;
     
    108108    @Override
    109109    protected void readPreferences() {
    110         rubberLineColor = new ColorProperty(marktr("helper line"), Color.RED).get();
    111         initialMoveDelay = Main.pref.getInteger("edit.initial-move-", 200);
    112         initialMoveThreshold = Main.pref.getInteger("edit.initial-move-threshold", 5);
     110        rubberLineColor = new NamedColorProperty(marktr("helper line"), Color.RED).get();
     111        initialMoveDelay = Main.pref.getInt("edit.initial-move-", 200);
     112        initialMoveThreshold = Main.pref.getInt("edit.initial-move-threshold", 5);
    113113        initialMoveThreshold *= initialMoveThreshold;
    114114        drawHelperLine = Main.pref.getBoolean("draw.helper-line", true);
  • applications/editors/josm/plugins/splinex/src/org/openstreetmap/josm/plugins/Splinex/Spline.java

    r33555 r33844  
    2828import org.openstreetmap.josm.command.SequenceCommand;
    2929import org.openstreetmap.josm.data.coor.EastNorth;
     30import org.openstreetmap.josm.data.osm.DataSet;
    3031import org.openstreetmap.josm.data.osm.DefaultNameFormatter;
    3132import org.openstreetmap.josm.data.osm.Node;
     
    251252        EastNorth a = sn.node.getEastNorth();
    252253        EastNorth ca = a.add(sn.cnext);
     254        DataSet ds = MainApplication.getLayerManager().getEditDataSet();
    253255        while (it.hasNext()) {
    254256            sn = it.next();
     
    265267                        return;
    266268                    }
    267                     cmds.add(new AddCommand(n));
     269                    cmds.add(new AddCommand(ds, n));
    268270                    w.addNode(n);
    269271                }
     
    273275        }
    274276        if (!cmds.isEmpty())
    275             cmds.add(new AddCommand(w));
     277            cmds.add(new AddCommand(ds, w));
    276278        MainApplication.undoRedo.add(new FinishSplineCommand(cmds));
    277279    }
     
    301303
    302304        public AddSplineNodeCommand(SNode sn, boolean existing, int idx) {
     305            super(MainApplication.getLayerManager().getEditDataSet());
    303306            this.sn = sn;
    304307            this.existing = existing;
     
    362365
    363366        public DeleteSplineNodeCommand(int idx) {
     367            super(MainApplication.getLayerManager().getEditDataSet());
    364368            this.idx = idx;
    365369        }
     
    419423
    420424        public EditSplineCommand(SNode sn) {
     425            super(MainApplication.getLayerManager().getEditDataSet());
    421426            this.sn = sn;
    422427            cprev = sn.cprev.add(0, 0);
     
    458463
    459464    public class CloseSplineCommand extends Command {
     465       
     466        public CloseSplineCommand() {
     467            super(MainApplication.getLayerManager().getEditDataSet());
     468        }
     469
    460470        @Override
    461471        public boolean executeCommand() {
  • applications/editors/josm/plugins/splinex/src/org/openstreetmap/josm/plugins/Splinex/UndeleteNodeCommand.java

    r33534 r33844  
    1010import org.openstreetmap.josm.data.osm.Node;
    1111import org.openstreetmap.josm.data.osm.OsmPrimitive;
     12import org.openstreetmap.josm.gui.MainApplication;
    1213
    1314class UndeleteNodeCommand extends Command {
     
    1617
    1718    UndeleteNodeCommand(Node n) {
     19        super(MainApplication.getLayerManager().getEditDataSet());
    1820        this.n = n;
    1921    }
Note: See TracChangeset for help on using the changeset viewer.