Changeset 301 in josm for src/org/openstreetmap/josm/actions
- Timestamp:
- 2007-08-08T14:56:38+02:00 (18 years ago)
- Location:
- src/org/openstreetmap/josm/actions
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
src/org/openstreetmap/josm/actions/AlignInCircleAction.java
r298 r301 68 68 } 69 69 70 Main.main. editLayer().add(new SequenceCommand(tr("Align Nodes in Circle"), cmds));70 Main.main.undoRedo.add(new SequenceCommand(tr("Align Nodes in Circle"), cmds)); 71 71 Main.map.repaint(); 72 72 } -
src/org/openstreetmap/josm/actions/AlignInLineAction.java
r298 r301 110 110 111 111 // Do it! 112 Main.main. editLayer().add(new SequenceCommand(tr("Align Nodes in Line"), cmds));112 Main.main.undoRedo.add(new SequenceCommand(tr("Align Nodes in Line"), cmds)); 113 113 Main.map.repaint(); 114 114 } -
src/org/openstreetmap/josm/actions/CombineWayAction.java
r298 r301 99 99 cmds.add(new DeleteCommand(selectedWays)); 100 100 cmds.add(new ChangeCommand(oldWay, newWay)); 101 Main.main. editLayer().add(new SequenceCommand(tr("Combine {0} ways", selectedWays.size()), cmds));101 Main.main.undoRedo.add(new SequenceCommand(tr("Combine {0} ways", selectedWays.size()), cmds)); 102 102 Main.ds.setSelected(oldWay); 103 103 } -
src/org/openstreetmap/josm/actions/RedoAction.java
r298 r301 30 30 return; 31 31 Main.map.repaint(); 32 Main.main. editLayer().redo();32 Main.main.undoRedo.redo(); 33 33 } 34 34 } -
src/org/openstreetmap/josm/actions/ReorderAction.java
r298 r301 59 59 60 60 if( c != null ) 61 Main.main. editLayer().add( c);61 Main.main.undoRedo.add(c); 62 62 } 63 63 } -
src/org/openstreetmap/josm/actions/ReverseSegmentAction.java
r298 r301 54 54 c.add(new ChangeCommand(s, snew)); 55 55 } 56 Main.main. editLayer().add(new SequenceCommand(tr("Reverse Segments"), c));56 Main.main.undoRedo.add(new SequenceCommand(tr("Reverse Segments"), c)); 57 57 Main.map.repaint(); 58 58 } -
src/org/openstreetmap/josm/actions/SplitWayAction.java
r298 r301 455 455 NameVisitor v = new NameVisitor(); 456 456 v.visit(selectedWay); 457 Main.main. editLayer().add(new SequenceCommand(tr("Split way {0} into {1} parts",v.name, segmentSets.size()), commandList));457 Main.main.undoRedo.add(new SequenceCommand(tr("Split way {0} into {1} parts",v.name, segmentSets.size()), commandList)); 458 458 Main.ds.setSelected(newSelection); 459 459 } -
src/org/openstreetmap/josm/actions/UndoAction.java
r298 r301 30 30 return; 31 31 Main.map.repaint(); 32 Main.main. editLayer().undo();32 Main.main.undoRedo.undo(); 33 33 } 34 34 } -
src/org/openstreetmap/josm/actions/mapmode/AddNodeAction.java
r298 r301 170 170 } 171 171 172 Main.main. editLayer().add(c);172 Main.main.undoRedo.add(c); 173 173 Main.ds.setSelected(n); 174 174 Main.map.mapView.repaint(); -
src/org/openstreetmap/josm/actions/mapmode/AddSegmentAction.java
r298 r301 146 146 147 147 Segment ls = new Segment(start, end); 148 Main.main. editLayer().add(new AddCommand(ls));148 Main.main.undoRedo.add(new AddCommand(ls)); 149 149 Collection<OsmPrimitive> sel = Main.ds.getSelected(); 150 150 sel.add(ls); -
src/org/openstreetmap/josm/actions/mapmode/AddWayAction.java
r298 r301 107 107 copy.segments.remove(s); 108 108 if (copy.segments.isEmpty()) { 109 Main.main. editLayer().add(new DeleteCommand(Arrays.asList(new OsmPrimitive[]{way})));109 Main.main.undoRedo.add(new DeleteCommand(Arrays.asList(new OsmPrimitive[]{way}))); 110 110 way = null; 111 111 } else 112 Main.main. editLayer().add(new ChangeCommand(way, copy));112 Main.main.undoRedo.add(new ChangeCommand(way, copy)); 113 113 } else { 114 114 if (way == null) { 115 115 way = new Way(); 116 116 way.segments.add(s); 117 Main.main. editLayer().add(new AddCommand(way));117 Main.main.undoRedo.add(new AddCommand(way)); 118 118 } else { 119 119 Way copy = new Way(way); … … 123 123 break; 124 124 copy.segments.add(i, s); 125 Main.main. editLayer().add(new ChangeCommand(way, copy));125 Main.main.undoRedo.add(new ChangeCommand(way, copy)); 126 126 } 127 127 } … … 198 198 w.segments.clear(); 199 199 w.segments.addAll(sortedSegments); 200 Main.main. editLayer().add(new ChangeCommand(wayToAdd, w));200 Main.main.undoRedo.add(new ChangeCommand(wayToAdd, w)); 201 201 return wayToAdd; 202 202 } … … 207 207 Way w = new Way(); 208 208 w.segments.addAll(sortedSegments); 209 Main.main. editLayer().add(new AddCommand(w));209 Main.main.undoRedo.add(new AddCommand(w)); 210 210 return w; 211 211 } -
src/org/openstreetmap/josm/actions/mapmode/DeleteAction.java
r298 r301 126 126 v.data.addAll(selection); 127 127 if (!v.data.isEmpty()) 128 Main.main. editLayer().add(new DeleteCommand(v.data));128 Main.main.undoRedo.add(new DeleteCommand(v.data)); 129 129 } 130 130 … … 164 164 } 165 165 if (!del.isEmpty()) 166 Main.main. editLayer().add(new DeleteCommand(del));166 Main.main.undoRedo.add(new DeleteCommand(del)); 167 167 } 168 168 … … 213 213 cmds.add(new ChangeCommand(seg1, s)); 214 214 cmds.add(new DeleteCommand(Arrays.asList(new OsmPrimitive[]{n, seg2}))); 215 Main.main. editLayer().add(new SequenceCommand(tr("Delete Node"), cmds));215 Main.main.undoRedo.add(new SequenceCommand(tr("Delete Node"), cmds)); 216 216 return null; 217 217 } -
src/org/openstreetmap/josm/actions/mapmode/MoveAction.java
r298 r301 106 106 } 107 107 108 Command c = !Main.main. editLayer().commands.isEmpty() ? Main.main.editLayer().commands.getLast() : null;108 Command c = !Main.main.undoRedo.commands.isEmpty() ? Main.main.undoRedo.commands.getLast() : null; 109 109 if (c instanceof MoveCommand && affectedNodes.equals(((MoveCommand)c).objects)) 110 110 ((MoveCommand)c).moveAgain(dx,dy); 111 111 else 112 Main.main. editLayer().add(new MoveCommand(selection, dx, dy));112 Main.main.undoRedo.add(new MoveCommand(selection, dx, dy)); 113 113 114 114 Main.map.mapView.repaint();
Note:
See TracChangeset
for help on using the changeset viewer.