Changeset 33844 in osm for applications
- Timestamp:
- 2017-11-21T01:18:27+01:00 (7 years ago)
- Location:
- applications/editors/josm/plugins/splinex
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/splinex/build.xml
r33534 r33844 5 5 <property name="commit.message" value="Commit message"/> 6 6 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 7 <property name="plugin.main.version" value="12 663"/>7 <property name="plugin.main.version" value="12987"/> 8 8 9 9 <!-- Configure these properties (replace "..." accordingly). -
applications/editors/josm/plugins/splinex/src/org/openstreetmap/josm/plugins/Splinex/DrawSplineAction.java
r33534 r33844 28 28 import org.openstreetmap.josm.data.osm.OsmPrimitive; 29 29 import org.openstreetmap.josm.data.osm.visitor.paint.MapPaintSettings; 30 import org.openstreetmap.josm.data.preferences. ColorProperty;30 import org.openstreetmap.josm.data.preferences.NamedColorProperty; 31 31 import org.openstreetmap.josm.gui.MainApplication; 32 32 import org.openstreetmap.josm.gui.MapFrame; … … 108 108 @Override 109 109 protected void readPreferences() { 110 rubberLineColor = new ColorProperty(marktr("helper line"), Color.RED).get();111 initialMoveDelay = Main.pref.getInt eger("edit.initial-move-", 200);112 initialMoveThreshold = Main.pref.getInt eger("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); 113 113 initialMoveThreshold *= initialMoveThreshold; 114 114 drawHelperLine = Main.pref.getBoolean("draw.helper-line", true); -
applications/editors/josm/plugins/splinex/src/org/openstreetmap/josm/plugins/Splinex/Spline.java
r33555 r33844 28 28 import org.openstreetmap.josm.command.SequenceCommand; 29 29 import org.openstreetmap.josm.data.coor.EastNorth; 30 import org.openstreetmap.josm.data.osm.DataSet; 30 31 import org.openstreetmap.josm.data.osm.DefaultNameFormatter; 31 32 import org.openstreetmap.josm.data.osm.Node; … … 251 252 EastNorth a = sn.node.getEastNorth(); 252 253 EastNorth ca = a.add(sn.cnext); 254 DataSet ds = MainApplication.getLayerManager().getEditDataSet(); 253 255 while (it.hasNext()) { 254 256 sn = it.next(); … … 265 267 return; 266 268 } 267 cmds.add(new AddCommand( n));269 cmds.add(new AddCommand(ds, n)); 268 270 w.addNode(n); 269 271 } … … 273 275 } 274 276 if (!cmds.isEmpty()) 275 cmds.add(new AddCommand( w));277 cmds.add(new AddCommand(ds, w)); 276 278 MainApplication.undoRedo.add(new FinishSplineCommand(cmds)); 277 279 } … … 301 303 302 304 public AddSplineNodeCommand(SNode sn, boolean existing, int idx) { 305 super(MainApplication.getLayerManager().getEditDataSet()); 303 306 this.sn = sn; 304 307 this.existing = existing; … … 362 365 363 366 public DeleteSplineNodeCommand(int idx) { 367 super(MainApplication.getLayerManager().getEditDataSet()); 364 368 this.idx = idx; 365 369 } … … 419 423 420 424 public EditSplineCommand(SNode sn) { 425 super(MainApplication.getLayerManager().getEditDataSet()); 421 426 this.sn = sn; 422 427 cprev = sn.cprev.add(0, 0); … … 458 463 459 464 public class CloseSplineCommand extends Command { 465 466 public CloseSplineCommand() { 467 super(MainApplication.getLayerManager().getEditDataSet()); 468 } 469 460 470 @Override 461 471 public boolean executeCommand() { -
applications/editors/josm/plugins/splinex/src/org/openstreetmap/josm/plugins/Splinex/UndeleteNodeCommand.java
r33534 r33844 10 10 import org.openstreetmap.josm.data.osm.Node; 11 11 import org.openstreetmap.josm.data.osm.OsmPrimitive; 12 import org.openstreetmap.josm.gui.MainApplication; 12 13 13 14 class UndeleteNodeCommand extends Command { … … 16 17 17 18 UndeleteNodeCommand(Node n) { 19 super(MainApplication.getLayerManager().getEditDataSet()); 18 20 this.n = n; 19 21 }
Note:
See TracChangeset
for help on using the changeset viewer.