Changeset 3652 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2010-11-08T23:29:07+01:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/NavigatableComponent.java
r3642 r3652 593 593 if (ntsel == null && nd.isSelected()) { 594 594 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); 595 600 } 596 601 // find the nearest newest node that is within about the same … … 604 609 // take nearest selected, nearest new or true nearest node to p, in that order 605 610 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 } 610 614 return n; 611 615 } … … 994 998 * @return o as collection of o's type. 995 999 */ 996 public finalstatic <T> Collection<T> asColl(T o) {1000 public static <T> Collection<T> asColl(T o) { 997 1001 if (o == null) 998 1002 return Collections.emptySet(); … … 1000 1004 } 1001 1005 1002 public finalstatic double perDist(Point2D pt, Point2D a, Point2D b) {1006 public static double perDist(Point2D pt, Point2D a, Point2D b) { 1003 1007 if (pt != null && a != null && b != null) { 1004 1008 double pd = ( … … 1018 1022 * with its orthogonal line running through pt 1019 1023 */ 1020 public finalstatic Point2D project(Point2D pt, Point2D a, Point2D b) {1024 public static Point2D project(Point2D pt, Point2D a, Point2D b) { 1021 1025 if (pt != null && a != null && b != null) { 1022 1026 double r = (( … … 1038 1042 * @return new point at a + r*(ab) 1039 1043 */ 1040 public finalstatic Point2D project(double r, Point2D a, Point2D b) {1044 public static Point2D project(double r, Point2D a, Point2D b) { 1041 1045 Point2D ret = null; 1042 1046
Note:
See TracChangeset
for help on using the changeset viewer.