Changeset 12630 in josm for trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/AddNodeHandler.java
- Timestamp:
- 2017-08-24T00:15:51+02:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/AddNodeHandler.java
r12620 r12630 14 14 import org.openstreetmap.josm.data.osm.Node; 15 15 import org.openstreetmap.josm.data.osm.OsmPrimitive; 16 import org.openstreetmap.josm.gui.MainApplication; 17 import org.openstreetmap.josm.gui.MapView; 16 18 import org.openstreetmap.josm.gui.util.GuiHelper; 17 19 import org.openstreetmap.josm.io.remotecontrol.AddTagsDialog; … … 85 87 Node node = null; 86 88 87 if (Main.isDisplayingMapView()) { 88 Point p = Main.map.mapView.getPoint(ll); 89 node = Main.map.mapView.getNearestNode(p, OsmPrimitive::isUsable); 89 if (MainApplication.isDisplayingMapView()) { 90 MapView mapView = MainApplication.getMap().mapView; 91 Point p = mapView.getPoint(ll); 92 node = mapView.getNearestNode(p, OsmPrimitive::isUsable); 90 93 if (node != null && node.getCoor().greatCircleDistance(ll) > Main.pref.getDouble("remotecontrol.tolerance", 0.1)) { 91 94 node = null; // node is too far … … 103 106 AutoScaleAction.autoScale("selection"); 104 107 } else { 105 Main .map.mapView.repaint();108 MainApplication.getMap().mapView.repaint(); 106 109 } 107 110 // parse parameter addtags=tag1=value1|tag2=vlaue2
Note:
See TracChangeset
for help on using the changeset viewer.
