Changeset 35452 in osm for applications/editors/josm
- Timestamp:
- 2020-05-15T10:00:32+02:00 (5 years ago)
- Location:
- applications/editors/josm/plugins
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/reverter/src/reverter/ReverterUploadHook.java
r34974 r35452 28 28 public boolean checkUpload(APIDataSet apiDataSet) { 29 29 if (ReverterPlugin.reverterUsed) { 30 for (Command cmd : UndoRedoHandler.getInstance(). commands) {30 for (Command cmd : UndoRedoHandler.getInstance().getUndoCommands()) { 31 31 if (isReverterCmd(cmd)) { 32 32 MainApplication.getLayerManager().getEditDataSet().addChangeSetTag("created_by", pluginString); -
applications/editors/josm/plugins/splinex/src/org/openstreetmap/josm/plugins/Splinex/DrawSplineAction.java
r34557 r35452 187 187 + ph.sn.cnext.north()) < EPSILON); 188 188 } 189 if (ph.point == SplinePoint.ENDPOINT && !UndoRedoHandler.getInstance().commands.isEmpty()) {190 Command cmd = UndoRedoHandler.getInstance(). commands.getLast();189 if (ph.point == SplinePoint.ENDPOINT && UndoRedoHandler.getInstance().hasUndoCommands()) { 190 Command cmd = UndoRedoHandler.getInstance().getLastCommand(); 191 191 if (cmd instanceof MoveCommand) { 192 192 mc = (MoveCommand) cmd; … … 198 198 } 199 199 } 200 if (ph.point != SplinePoint.ENDPOINT && !UndoRedoHandler.getInstance().commands.isEmpty()) {201 Command cmd = UndoRedoHandler.getInstance(). commands.getLast();200 if (ph.point != SplinePoint.ENDPOINT && UndoRedoHandler.getInstance().hasUndoCommands()) { 201 Command cmd = UndoRedoHandler.getInstance().getLastCommand(); 202 202 if (!(cmd instanceof Spline.EditSplineCommand && ((Spline.EditSplineCommand) cmd).sn == ph.sn)) 203 203 dragControl = true; … … 210 210 } 211 211 if (spl.isClosed()) return; 212 if (direction == 0) 213 if (spl.nodeCount() < 2) 212 if (direction == 0) { 213 if (spl.nodeCount() < 2) { 214 214 direction = 1; 215 else215 } else { 216 216 return; 217 } 218 } 217 219 Node n = null; 218 220 boolean existing = false; -
applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/SelectModNodesAction.java
r34932 r35452 41 41 Command cmd = null; 42 42 43 if (UndoRedoHandler.getInstance().commands == null) return; 44 int num = UndoRedoHandler.getInstance().commands.size(); 43 int num = UndoRedoHandler.getInstance().getUndoCommands().size(); 45 44 if (num == 0) return; 46 45 int k = 0, idx; 47 46 // check if executed again, we cycle through all available commands 48 47 if (lastCmd != null && !selection.isEmpty()) { 49 idx = UndoRedoHandler.getInstance(). commands.lastIndexOf(lastCmd);48 idx = UndoRedoHandler.getInstance().getUndoCommands().lastIndexOf(lastCmd); 50 49 } else { 51 50 idx = num; … … 55 54 do { // select next history element 56 55 if (idx > 0) idx--; else idx = num-1; 57 cmd = UndoRedoHandler.getInstance(). commands.get(idx);56 cmd = UndoRedoHandler.getInstance().getUndoCommands().get(idx); 58 57 if (cmd.getAffectedDataSet() == ds) { 59 58 Collection<? extends OsmPrimitive> pp = cmd.getParticipatingPrimitives(); -
applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/SelectModWaysAction.java
r34932 r35452 40 40 Command cmd; 41 41 42 if (UndoRedoHandler.getInstance().commands == null) return; 43 int num = UndoRedoHandler.getInstance().commands.size(); 42 int num = UndoRedoHandler.getInstance().getUndoCommands().size(); 44 43 if (num == 0) return; 45 44 int k = 0, idx; 46 45 // check if executed again, we cycle through all available commands 47 46 if (lastCmd != null && !ds.getSelectedWays().isEmpty()) { 48 idx = UndoRedoHandler.getInstance(). commands.lastIndexOf(lastCmd);47 idx = UndoRedoHandler.getInstance().getUndoCommands().lastIndexOf(lastCmd); 49 48 } else { 50 49 idx = num; … … 54 53 do { // select next history element 55 54 if (idx > 0) idx--; else idx = num-1; 56 cmd = UndoRedoHandler.getInstance(). commands.get(idx);55 cmd = UndoRedoHandler.getInstance().getUndoCommands().get(idx); 57 56 if (cmd.getAffectedDataSet() == ds) { 58 57 Collection<? extends OsmPrimitive> pp = cmd.getParticipatingPrimitives();
Note:
See TracChangeset
for help on using the changeset viewer.