Ticket #21770: 21770.patch
File 21770.patch, 2.5 KB (added by , 3 years ago) |
---|
-
build.xml
4 4 <!-- enter the SVN commit message --> 5 5 <property name="commit.message" value="Update spline shortcut key"/> 6 6 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 7 <property name="plugin.main.version" value="14 281"/>7 <property name="plugin.main.version" value="14960"/> 8 8 9 9 <!-- Configure these properties (replace "..." accordingly). 10 10 See https://josm.openstreetmap.de/wiki/DevelopersGuide/DevelopingPlugins -
src/org/openstreetmap/josm/plugins/Splinex/DrawSplineAction.java
28 28 import org.openstreetmap.josm.data.osm.OsmPrimitive; 29 29 import org.openstreetmap.josm.data.osm.visitor.paint.MapPaintSettings; 30 30 import org.openstreetmap.josm.data.preferences.NamedColorProperty; 31 import org.openstreetmap.josm.data.projection.ProjectionRegistry;32 31 import org.openstreetmap.josm.gui.MainApplication; 33 32 import org.openstreetmap.josm.gui.MapFrame; 34 33 import org.openstreetmap.josm.gui.MapView; … … 263 262 if (clickPos != null && clickPos.distanceSq(e.getPoint()) < initialMoveThreshold) 264 263 return; 265 264 EastNorth en = MainApplication.getMap().mapView.getEastNorth(e.getX(), e.getY()); 266 if ( ProjectionRegistry.getProjection().eastNorth2latlon(en).isOutSideWorld())265 if (new Node(en).isOutSideWorld()) 267 266 return; 268 267 if (dragSpline) { 269 268 if (mc == null) { -
src/org/openstreetmap/josm/plugins/Splinex/Spline.java
263 263 for (int i = 1; i < detail; i++) { 264 264 Node n = new Node(ProjectionRegistry.getProjection().eastNorth2latlon( 265 265 cubicBezier(a, ca, cb, b, (double) i / detail))); 266 if (n. getCoor().isOutSideWorld()) {266 if (n.isOutSideWorld()) { 267 267 JOptionPane.showMessageDialog(MainApplication.getMainFrame(), tr("Spline goes outside of the world.")); 268 268 return; 269 269 }