Changeset 17110 in josm
- Timestamp:
- 2020-10-08T10:37:27+02:00 (4 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/CreateCircleAction.java
r16438 r17110 16 16 17 17 import org.openstreetmap.josm.command.AddCommand; 18 import org.openstreetmap.josm.command.Change Command;18 import org.openstreetmap.josm.command.ChangeNodesCommand; 19 19 import org.openstreetmap.josm.command.Command; 20 20 import org.openstreetmap.josm.command.SequenceCommand; … … 234 234 cmds.add(new AddCommand(ds, newWay)); 235 235 } else { 236 Way newWay = new Way(existingWay); 237 newWay.setNodes(nodesToAdd); 238 cmds.add(new ChangeCommand(ds, existingWay, newWay)); 236 cmds.add(new ChangeNodesCommand(ds, existingWay, nodesToAdd)); 239 237 } 240 238 -
trunk/src/org/openstreetmap/josm/actions/SimplifyWayAction.java
r16630 r17110 31 31 import javax.swing.event.ChangeListener; 32 32 33 import org.openstreetmap.josm.command.Change Command;33 import org.openstreetmap.josm.command.ChangeNodesCommand; 34 34 import org.openstreetmap.josm.command.Command; 35 35 import org.openstreetmap.josm.command.DeleteCommand; … … 411 411 412 412 Collection<Command> cmds = new LinkedList<>(); 413 Way newWay = new Way(w); 414 newWay.setNodes(newNodes); 415 cmds.add(new ChangeCommand(w, newWay)); 413 cmds.add(new ChangeNodesCommand(w, newNodes)); 416 414 cmds.add(new DeleteCommand(w.getDataSet(), delNodes)); 417 415 w.getDataSet().clearSelection(delNodes); -
trunk/src/org/openstreetmap/josm/actions/mapmode/ImproveWayAccuracyAction.java
r15063 r17110 490 490 UndoRedoHandler.getInstance().add(deleteCmd); 491 491 } 492 newWay.setNodes(null); 492 493 } else { 493 494 UndoRedoHandler.getInstance().add(new ChangeCommand(targetWay, newWay)); -
trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java
r16968 r17110 17 17 import java.util.Iterator; 18 18 import java.util.LinkedList; 19 import java.util.List; 19 20 import java.util.Optional; 20 21 … … 23 24 import org.openstreetmap.josm.actions.MergeNodesAction; 24 25 import org.openstreetmap.josm.command.AddCommand; 25 import org.openstreetmap.josm.command.Change Command;26 import org.openstreetmap.josm.command.ChangeNodesCommand; 26 27 import org.openstreetmap.josm.command.Command; 27 28 import org.openstreetmap.josm.command.MoveCommand; … … 1242 1243 for (WaySegment virtualWay : virtualWays) { 1243 1244 Way w = virtualWay.way; 1244 Way wnew = new Way(w);1245 wnew.addNode(virtualWay.lowerIndex + 1, virtualNode);1246 virtualCmds.add(new Change Command(ds, w, wnew));1245 List<Node> modNodes = w.getNodes(); 1246 modNodes.add(virtualWay.lowerIndex + 1, virtualNode); 1247 virtualCmds.add(new ChangeNodesCommand(ds, w, modNodes)); 1247 1248 } 1248 1249 virtualCmds.add(new MoveCommand(ds, virtualNode, startEN, currentEN)); -
trunk/src/org/openstreetmap/josm/data/osm/DataSet.java
r16553 r17110 1096 1096 update(() -> { 1097 1097 clearSelection(); 1098 clearSelectionHistory(); 1098 1099 for (OsmPrimitive primitive : allPrimitives) { 1099 1100 primitive.setDataset(null); -
trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/AbstractMapRenderer.java
r16553 r17110 13 13 import org.openstreetmap.josm.data.osm.IWay; 14 14 import org.openstreetmap.josm.data.osm.OsmData; 15 import org.openstreetmap.josm.data.osm.Way; 15 16 import org.openstreetmap.josm.data.osm.WaySegment; 16 17 import org.openstreetmap.josm.gui.MapViewState; … … 149 150 for (WaySegment wseg: data.getHighlightedVirtualNodes()) { 150 151 if (wseg.way.isUsable() && !wseg.way.isDisabled()) { 151 visitVirtual(path, wseg.toWay()); 152 Way tmpWay = wseg.toWay(); 153 visitVirtual(path, tmpWay); 154 tmpWay.setNodes(null); 152 155 } 153 156 } -
trunk/src/org/openstreetmap/josm/data/validation/tests/Coastlines.java
r14302 r17110 14 14 import java.util.Set; 15 15 16 import org.openstreetmap.josm.command.Change Command;16 import org.openstreetmap.josm.command.ChangeNodesCommand; 17 17 import org.openstreetmap.josm.command.Command; 18 18 import org.openstreetmap.josm.data.osm.Node; … … 261 261 if (it.hasNext()) { 262 262 Way way = (Way) it.next(); 263 Way newWay = new Way(way); 264 265 List<Node> nodesCopy = newWay.getNodes(); 263 264 List<Node> nodesCopy = way.getNodes(); 266 265 Collections.reverse(nodesCopy); 267 newWay.setNodes(nodesCopy); 268 269 return new ChangeCommand(way, newWay); 266 267 return new ChangeNodesCommand(way, nodesCopy); 270 268 } 271 269 }
Note:
See TracChangeset
for help on using the changeset viewer.