Changeset 813 in josm for trunk/src/org/openstreetmap/josm/actions
- Timestamp:
- 2008-08-21T00:34:53+02:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java
r805 r813 206 206 private Collection<OsmPrimitive> getNearestCollectionVirtual(Point p) { 207 207 MapView c = Main.map.mapView; 208 int snapDistance = Main.pref.getInteger("mappaint.node.virtual-snap-distance", 8); 209 snapDistance *= snapDistance; 208 210 OsmPrimitive osm = c.getNearestNode(p); 209 211 if (osm == null) … … 220 222 int xd = p2.x-p1.x; if(xd < 0) xd = -xd; 221 223 int yd = p2.y-p1.y; if(yd < 0) yd = -yd; 222 if(xd+yd > Main.pref.getInteger("mappaint.node.virtual-space", 50))224 if(xd+yd > Main.pref.getInteger("mappaint.node.virtual-space", 70)) 223 225 { 224 226 Point pc = new Point((p1.x+p2.x)/2, (p1.y+p2.y)/2); 225 if(p.distanceSq(pc) < Main.map.mapView.snapDistance)227 if(p.distanceSq(pc) < snapDistance) 226 228 { 227 229 Collection<Command> cmds = new LinkedList<Command>();
Note:
See TracChangeset
for help on using the changeset viewer.