Changeset 4152 in josm


Ignore:
Timestamp:
2011-06-19T23:55:40+02:00 (10 years ago)
Author:
stoecker
Message:

fix #6217 - Corrupted data after merging nodes

File:
1 edited

Legend:

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

    r4118 r4152  
    636636            if (!target.isEmpty()) {
    637637                Collection<Node> nodesToMerge = new LinkedList<Node>(affectedNodes);
    638                 nodesToMerge.add(target.iterator().next());
    639 
    640                 Command cmd = MergeNodesAction.mergeNodes(Main.main.getEditLayer(), nodesToMerge, target.iterator().next());
     638                Node t = target.iterator().next();
     639                nodesToMerge.add(t);
     640                Command cmd = MergeNodesAction.mergeNodes(Main.main.getEditLayer(), nodesToMerge, t);
    641641                if (cmd != null) {
    642642                    Main.main.undoRedo.add(cmd);
     643                    getCurrentDataSet().setSelected(t);
    643644                }
    644645            }
Note: See TracChangeset for help on using the changeset viewer.