Changeset 12630 in josm for trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/AddWayHandler.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/AddWayHandler.java
r10716 r12630 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 5 6 import java.awt.Point;7 6 import java.util.ArrayList; 8 7 import java.util.Arrays; … … 23 22 import org.openstreetmap.josm.data.osm.OsmPrimitive; 24 23 import org.openstreetmap.josm.data.osm.Way; 24 import org.openstreetmap.josm.gui.MainApplication; 25 import org.openstreetmap.josm.gui.MapView; 25 26 import org.openstreetmap.josm.gui.util.GuiHelper; 26 27 import org.openstreetmap.josm.io.remotecontrol.AddTagsDialog; … … 125 126 Node nd = null; 126 127 127 if (Main.isDisplayingMapView()) { 128 Point p= Main.map.mapView.getPoint(ll);129 nd = Main.map.mapView.getNearestNode(p, OsmPrimitive::isUsable);128 if (MainApplication.isDisplayingMapView()) { 129 MapView mapView = MainApplication.getMap().mapView; 130 nd = mapView.getNearestNode(mapView.getPoint(ll), OsmPrimitive::isUsable); 130 131 if (nd != null && nd.getCoor().greatCircleDistance(ll) > Main.pref.getDouble("remote.tolerance", 0.1)) { 131 132 nd = null; // node is too far … … 171 172 AutoScaleAction.autoScale("selection"); 172 173 } else { 173 Main .map.mapView.repaint();174 MainApplication.getMap().mapView.repaint(); 174 175 } 175 176 return way;
Note:
See TracChangeset
for help on using the changeset viewer.
