Ignore:
Timestamp:
2008-08-21T00:34:53+02:00 (16 years ago)
Author:
stoecker
Message:

support of Garmin time stamps in GPX import. patch by Roland Ramthun

File:
1 edited

Legend:

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

    r805 r813  
    206206        private Collection<OsmPrimitive> getNearestCollectionVirtual(Point p) {
    207207                MapView c = Main.map.mapView;
     208                int snapDistance = Main.pref.getInteger("mappaint.node.virtual-snap-distance", 8);
     209                snapDistance *= snapDistance;
    208210                OsmPrimitive osm = c.getNearestNode(p);
    209211                if (osm == null)
     
    220222                                        int xd = p2.x-p1.x; if(xd < 0) xd = -xd;
    221223                                        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))
    223225                                        {
    224226                                                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)
    226228                                                {
    227229                                                        Collection<Command> cmds = new LinkedList<Command>();
Note: See TracChangeset for help on using the changeset viewer.