Ignore:
Timestamp:
2022-03-22T19:22:47+01:00 (3 years ago)
Author:
taylor.smock
Message:

fix #21770: Update deprecated functions in splinex

This replaces usages of LatLon#isOutsideWorld with Node#isOutsideWorld

Location:
applications/editors/josm/plugins/splinex
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/splinex/build.xml

    r35718 r35936  
    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).
  • applications/editors/josm/plugins/splinex/src/org/openstreetmap/josm/plugins/Splinex/DrawSplineAction.java

    r35866 r35936  
    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;
     
    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) {
  • applications/editors/josm/plugins/splinex/src/org/openstreetmap/josm/plugins/Splinex/Spline.java

    r34901 r35936  
    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;
Note: See TracChangeset for help on using the changeset viewer.