Ticket #5609: NavigatableComponent.java.patch

File NavigatableComponent.java.patch, 1.1 KB (added by cmuelle8, 14 years ago)
  • src/org/openstreetmap/josm/gui/NavigatableComponent.java

     
    592592                    // find the nearest selected node
    593593                    if (ntsel == null && nd.isSelected()) {
    594594                        ntsel = nd;
     595                        use_selected |= (distSq == minDistSq);  // for unglue nodes feature
    595596                    }
    596597                    // find the nearest newest node that is within about the same
    597598                    // distance as the true nearest node
     
    603604
    604605            // take nearest selected, nearest new or true nearest node to p, in that order
    605606            n = (ntsel != null && use_selected) ? ntsel
    606                     : ((ntnew != null) ? ntnew
    607                             : nlists.values().iterator().next().get(0));
     607                    : (ntnew != null) ? ntnew
     608                            : nlists.values().iterator().next().get(0);
    608609        }
    609610
    610611        return n;