Changeset 3142 in josm for trunk


Ignore:
Timestamp:
2010-03-18T16:47:23+01:00 (10 years ago)
Author:
bastiK
Message:

see #4554 - Fixing duplicate nodes takes increasingly longer

Location:
trunk/src/org/openstreetmap/josm
Files:
1 added
1 edited

Legend:

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

    r3134 r3142  
    2222import org.openstreetmap.josm.Main;
    2323import org.openstreetmap.josm.command.ChangeCommand;
     24import org.openstreetmap.josm.command.ChangeNodesCommand;
    2425import org.openstreetmap.josm.command.Command;
    2526import org.openstreetmap.josm.command.DeleteCommand;
     
    130131     * @return a list of commands; null, if the ways could not be fixed
    131132     */
    132     protected static List<Command> fixParentWays(Collection<OsmPrimitive> nodesToDelete, Node targetNode) {
     133    protected static List<Command> fixParentWays(Collection<Node> nodesToDelete, Node targetNode) {
    133134        List<Command> cmds = new ArrayList<Command>();
    134135        Set<Way> waysToDelete = new HashSet<Way>();
     
    180181                waysToDelete.add(w);
    181182            } else {
    182                 Way newWay = new Way(w);
    183                 newWay.setNodes(newNodes);
    184                 cmds.add(new ChangeCommand(w, newWay));
     183                cmds.add(new ChangeNodesCommand(w, newNodes));
    185184            }
    186185        }
     
    240239        // the nodes we will have to delete
    241240        //
    242         Collection<OsmPrimitive> nodesToDelete = new HashSet<OsmPrimitive>(nodes);
     241        Collection<Node> nodesToDelete = new HashSet<Node>(nodes);
    243242        nodesToDelete.remove(targetNode);
    244243
Note: See TracChangeset for help on using the changeset viewer.