diff --git a/src/org/openstreetmap/josm/actions/UnGlueAction.java b/src/org/openstreetmap/josm/actions/UnGlueAction.java
index 71fb402..d9ff30e 100644
|
a
|
b
|
public class UnGlueAction extends JosmAction {
|
| 279 | 279 | /** |
| 280 | 280 | * dupe the given node of the given way |
| 281 | 281 | * |
| | 282 | * assume that OrginalNode is in the way |
| | 283 | * |
| 282 | 284 | * -> the new node will be put into the parameter newNodes. |
| 283 | 285 | * -> the add-node command will be put into the parameter cmds. |
| 284 | 286 | * -> the changed way will be returned and must be put into cmds by the caller! |
| 285 | 287 | */ |
| 286 | 288 | private Way modifyWay(Node originalNode, Way w, List<Command> cmds, List<Node> newNodes) { |
| | 289 | // clone the node for the way |
| | 290 | Node newNode = new Node(originalNode, true /* clear OSM ID */); |
| | 291 | newNodes.add(newNode); |
| | 292 | cmds.add(new AddCommand(newNode)); |
| | 293 | |
| 287 | 294 | ArrayList<Node> nn = new ArrayList<Node>(); |
| 288 | 295 | for (Node pushNode : w.getNodes()) { |
| 289 | 296 | if (originalNode == pushNode) { |
| 290 | | // clone the node for all other ways |
| 291 | | pushNode = new Node(pushNode, true /* clear OSM ID */); |
| 292 | | newNodes.add(pushNode); |
| 293 | | cmds.add(new AddCommand(pushNode)); |
| | 297 | pushNode = newNode; |
| 294 | 298 | } |
| 295 | 299 | nn.add(pushNode); |
| 296 | 300 | } |