Changeset 3652 in josm


Ignore:
Timestamp:
Nov 8, 2010 11:29:07 PM (3 years ago)
Author:
bastiK
Message:

fixed #5609 (patch by cmuelle8) - Unable to move node under another one

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/NavigatableComponent.java

    r3642 r3652  
    593593                    if (ntsel == null && nd.isSelected()) { 
    594594                        ntsel = nd; 
     595                        // if there are multiple nearest nodes, prefer the one 
     596                        // that is selected. This is required in order to drag 
     597                        // the selected node if multiple nodes have the same 
     598                        // coordinates (e.g. after unglue) 
     599                        use_selected |= (distSq == minDistSq); 
    595600                    } 
    596601                    // find the nearest newest node that is within about the same 
     
    604609            // take nearest selected, nearest new or true nearest node to p, in that order 
    605610            n = (ntsel != null && use_selected) ? ntsel 
    606                     : ((ntnew != null) ? ntnew 
    607                             : nlists.values().iterator().next().get(0)); 
    608         } 
    609  
     611                    : (ntnew != null) ? ntnew 
     612                            : nlists.values().iterator().next().get(0); 
     613        } 
    610614        return n; 
    611615    } 
     
    994998     * @return o as collection of o's type. 
    995999     */ 
    996     public final static <T> Collection<T> asColl(T o) { 
     1000    public static <T> Collection<T> asColl(T o) { 
    9971001        if (o == null) 
    9981002            return Collections.emptySet(); 
     
    10001004    } 
    10011005 
    1002     public final static double perDist(Point2D pt, Point2D a, Point2D b) { 
     1006    public static double perDist(Point2D pt, Point2D a, Point2D b) { 
    10031007        if (pt != null && a != null && b != null) { 
    10041008            double pd = ( 
     
    10181022     *      with its orthogonal line running through pt 
    10191023     */ 
    1020     public final static Point2D project(Point2D pt, Point2D a, Point2D b) { 
     1024    public static Point2D project(Point2D pt, Point2D a, Point2D b) { 
    10211025        if (pt != null && a != null && b != null) { 
    10221026            double r = (( 
     
    10381042     * @return new point at a + r*(ab) 
    10391043     */ 
    1040     public final static Point2D project(double r, Point2D a, Point2D b) { 
     1044    public static Point2D project(double r, Point2D a, Point2D b) { 
    10411045        Point2D ret = null; 
    10421046 
Note: See TracChangeset for help on using the changeset viewer.