Ticket #17375: 17375.patch
| File 17375.patch, 1.5 KB (added by , 7 years ago) |
|---|
-
src/org/openstreetmap/josm/plugins/buildings_tools/DrawBuildingAction.java
63 63 private Point drawStartPos; 64 64 private Point mousePos; 65 65 66 final Building building = new Building();66 final transient Building building = new Building(); 67 67 68 68 public DrawBuildingAction() { 69 69 super(tr("Draw buildings"), "building", tr("Draw buildings"), … … 211 211 WaySegment ws = MainApplication.getMap().mapView.getNearestWaySegment(mousePos, 212 212 OsmPrimitive::isSelectable); 213 213 if (ws != null && ws.way.get("building") != null) { 214 EastNorth p1 = ws.getFirstNode().getEastNorth();215 EastNorth p2 = ws.getSecondNode().getEastNorth();214 EastNorth p1 = latlon2eastNorth(ws.getFirstNode().getCoor()); 215 EastNorth p2 = latlon2eastNorth(ws.getSecondNode().getCoor()); 216 216 EastNorth enX = Geometry.closestPointToSegment(p1, p2, 217 MainApplication.getMap().mapView.getEastNorth(mousePos.x, mousePos.y));217 latlon2eastNorth(MainApplication.getMap().mapView.getLatLon(mousePos.x, mousePos.y))); 218 218 if (enX != null) { 219 219 return enX; 220 220 }
