Changeset 6275 in josm for trunk/src/org


Ignore:
Timestamp:
2013-10-01T00:02:57+02:00 (11 years ago)
Author:
Don-vip
Message:

fix #9129 - unnecessary change command when merning two nodes with exact same coordinates

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/MergeNodesAction.java

    r6202 r6275  
    340340            //
    341341            if (targetNode != targetLocationNode) {
    342                 Node newTargetNode = new Node(targetNode);
    343                 newTargetNode.setCoor(targetLocationNode.getCoor());
    344                 cmds.add(new ChangeCommand(targetNode, newTargetNode));
     342                LatLon targetLocationCoor = targetLocationNode.getCoor();
     343                if (!targetNode.getCoor().equals(targetLocationCoor)) {
     344                    Node newTargetNode = new Node(targetNode);
     345                    newTargetNode.setCoor(targetLocationCoor);
     346                    cmds.add(new ChangeCommand(targetNode, newTargetNode));
     347                }
    345348            }
    346349            cmds.addAll(resultion);
Note: See TracChangeset for help on using the changeset viewer.