Ticket #21770: 21770.patch

File 21770.patch, 2.5 KB (added by taylor.smock, 3 years ago)
  • build.xml

     
    44    <!-- enter the SVN commit message -->
    55    <property name="commit.message" value="Update spline shortcut key"/>
    66    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    7     <property name="plugin.main.version" value="14281"/>
     7    <property name="plugin.main.version" value="14960"/>
    88
    99    <!-- Configure these properties (replace "..." accordingly).
    1010         See https://josm.openstreetmap.de/wiki/DevelopersGuide/DevelopingPlugins
  • src/org/openstreetmap/josm/plugins/Splinex/DrawSplineAction.java

     
    2828import org.openstreetmap.josm.data.osm.OsmPrimitive;
    2929import org.openstreetmap.josm.data.osm.visitor.paint.MapPaintSettings;
    3030import org.openstreetmap.josm.data.preferences.NamedColorProperty;
    31 import org.openstreetmap.josm.data.projection.ProjectionRegistry;
    3231import org.openstreetmap.josm.gui.MainApplication;
    3332import org.openstreetmap.josm.gui.MapFrame;
    3433import org.openstreetmap.josm.gui.MapView;
     
    263262        if (clickPos != null && clickPos.distanceSq(e.getPoint()) < initialMoveThreshold)
    264263            return;
    265264        EastNorth en = MainApplication.getMap().mapView.getEastNorth(e.getX(), e.getY());
    266         if (ProjectionRegistry.getProjection().eastNorth2latlon(en).isOutSideWorld())
     265        if (new Node(en).isOutSideWorld())
    267266            return;
    268267        if (dragSpline) {
    269268            if (mc == null) {
  • src/org/openstreetmap/josm/plugins/Splinex/Spline.java

     
    263263                for (int i = 1; i < detail; i++) {
    264264                    Node n = new Node(ProjectionRegistry.getProjection().eastNorth2latlon(
    265265                            cubicBezier(a, ca, cb, b, (double) i / detail)));
    266                     if (n.getCoor().isOutSideWorld()) {
     266                    if (n.isOutSideWorld()) {
    267267                        JOptionPane.showMessageDialog(MainApplication.getMainFrame(), tr("Spline goes outside of the world."));
    268268                        return;
    269269                    }