Changeset 943 in josm


Ignore:
Timestamp:
Sep 10, 2008 1:09:39 AM (5 years ago)
Author:
framm
Message:
  • fixed virtual node problem where clicking and not dragging one virtual node, then clicking and dragging part of another way that did not have a virtual node, would create and move the virtual node clicked first.
File:
1 edited

Legend:

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

    r868 r943  
    168168                        return; 
    169169 
    170                 if(virtualWay != null) 
    171                 { 
     170                if (virtualWay != null) { 
    172171                        Collection<Command> virtualCmds = new LinkedList<Command>(); 
    173172                        virtualCmds.add(new AddCommand(virtualNode)); 
     
    181180                        virtualWay = null; 
    182181                        virtualNode = null; 
    183                 } 
    184                 else 
    185                 { 
     182                } else { 
    186183                        Collection<OsmPrimitive> selection = Main.ds.getSelected(); 
    187184                        Collection<Node> affectedNodes = AllNodesVisitor.getAllNodes(selection); 
     
    193190                        Command c = !Main.main.undoRedo.commands.isEmpty() 
    194191                                ? Main.main.undoRedo.commands.getLast() : null; 
    195                         if(c instanceof SequenceCommand) 
     192                        if (c instanceof SequenceCommand) 
    196193                                c = ((SequenceCommand)c).getLastCommand(); 
    197194 
     
    232229                snapDistance *= snapDistance; 
    233230                OsmPrimitive osm = c.getNearestNode(p); 
     231                virtualWay = null; 
     232                virtualNode = null; 
     233                 
    234234                if (osm == null) 
    235235                { 
    236236                        WaySegment nearestWaySeg = c.getNearestWaySegment(p); 
    237                         if(nearestWaySeg != null) 
     237                        if (nearestWaySeg != null) 
    238238                        { 
    239239                                osm = nearestWaySeg.way; 
     
    246246                                        { 
    247247                                                Point pc = new Point((p1.x+p2.x)/2, (p1.y+p2.y)/2); 
    248                                                 if(p.distanceSq(pc) < snapDistance) 
     248                                                if (p.distanceSq(pc) < snapDistance) 
    249249                                                { 
    250250                                                        virtualWay = nearestWaySeg; 
Note: See TracChangeset for help on using the changeset viewer.