Changeset 2431 in josm


Ignore:
Timestamp:
Nov 10, 2009 6:32:26 PM (4 years ago)
Author:
stoecker
Message:

applied #3804 - patch by Daeron - reduce unnecessary changes

File:
1 edited

Legend:

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

    r2323 r2431  
    6060        Collection<Command> cmds = new LinkedList<Command>(); 
    6161        for (Map.Entry<Way, List<Integer>> insertPoint : insertPoints.entrySet()) { 
     62            List<Integer> is = insertPoint.getValue(); 
     63            if (is.size() == 0) 
     64                continue; 
     65 
    6266            Way w = insertPoint.getKey(); 
    6367            List<Node> nodesToAdd = w.getNodes(); 
    64             List<Integer> is = insertPoint.getValue(); 
    6568            pruneSuccsAndReverse(is); 
    6669            for (int i : is) { 
     
    7174            cmds.add(new ChangeCommand(w, wnew)); 
    7275        } 
     76 
     77        if (cmds.size() == 0) 
     78            return; 
    7379 
    7480        Main.main.undoRedo.add(new SequenceCommand(tr("Join Node and Line"), cmds)); 
Note: See TracChangeset for help on using the changeset viewer.