Changeset 35452 in osm for applications/editors/josm/plugins/utilsplugin2
- Timestamp:
- 2020-05-15T10:00:32+02:00 (5 years ago)
- Location:
- applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
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.