Changeset 34566 in osm for applications


Ignore:
Timestamp:
2018-08-18T20:35:38+02:00 (6 years ago)
Author:
donvip
Message:

update to JOSM 14153

Location:
applications/editors/josm/plugins/turnlanes
Files:
6 edited

Legend:

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

    r34282 r34566  
    55    <property name="commit.message" value="fix toolbar warnings - toolbar still does not work"/>
    66    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    7     <property name="plugin.main.version" value="13922"/>
     7    <property name="plugin.main.version" value="14153"/>
    88
    99    <!--
  • applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/gui/GuiContainer.java

    r33085 r34566  
    1717import java.util.Map;
    1818
    19 import org.openstreetmap.josm.Main;
    2019import org.openstreetmap.josm.data.coor.EastNorth;
    2120import org.openstreetmap.josm.data.coor.LatLon;
     21import org.openstreetmap.josm.data.projection.ProjectionRegistry;
    2222import org.openstreetmap.josm.plugins.turnlanes.model.Junction;
    2323import org.openstreetmap.josm.plugins.turnlanes.model.Lane;
     
    5353        final Point2D origin = avgOrigin(locs(mc.getPrimaryJunctions()));
    5454
    55         final LatLon originCoor = Main.getProjection().eastNorth2latlon(new EastNorth(origin.getX(), origin.getY()));
    56         final LatLon relCoor = Main.getProjection().eastNorth2latlon(
     55        final LatLon originCoor = ProjectionRegistry.getProjection().eastNorth2latlon(new EastNorth(origin.getX(), origin.getY()));
     56        final LatLon relCoor = ProjectionRegistry.getProjection().eastNorth2latlon(
    5757                new EastNorth(origin.getX() + 1, origin.getY() + 1));
    5858
  • applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/gui/GuiUtil.java

    r33085 r34566  
    1212import java.util.List;
    1313
    14 import org.openstreetmap.josm.Main;
    1514import org.openstreetmap.josm.data.coor.EastNorth;
    1615import org.openstreetmap.josm.data.osm.Node;
     16import org.openstreetmap.josm.data.projection.ProjectionRegistry;
    1717import org.openstreetmap.josm.plugins.turnlanes.model.Junction;
    1818
     
    134134
    135135    public static Point2D loc(Node node) {
    136         final EastNorth loc = Main.getProjection().latlon2eastNorth(node.getCoor());
     136        final EastNorth loc = ProjectionRegistry.getProjection().latlon2eastNorth(node.getCoor());
    137137        return new Point2D.Double(loc.getX(), -loc.getY());
    138138    }
  • applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/model/Lane.java

    r33085 r34566  
    1010import java.util.Set;
    1111
    12 import org.openstreetmap.josm.Main;
     12import org.openstreetmap.josm.data.UndoRedoHandler;
    1313import org.openstreetmap.josm.data.osm.Node;
    1414import org.openstreetmap.josm.data.osm.Relation;
     
    221221        cmd.backup(r).put(key, Turn.join(lanes));
    222222
    223         Main.main.undoRedo.add(cmd);
     223        UndoRedoHandler.getInstance().add(cmd);
    224224    }
    225225
     
    241241        getOutgoingRoadEnd().removeLane(cmd, this);
    242242
    243         Main.main.undoRedo.add(cmd);
     243        UndoRedoHandler.getInstance().add(cmd);
    244244    }
    245245
  • applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/model/Road.java

    r33085 r34566  
    1111import java.util.Set;
    1212
    13 import org.openstreetmap.josm.Main;
     13import org.openstreetmap.josm.data.UndoRedoHandler;
    1414import org.openstreetmap.josm.data.osm.AbstractPrimitive;
    1515import org.openstreetmap.josm.data.osm.Node;
     
    141141            }
    142142
    143             Main.main.undoRedo.add(cmd);
     143            UndoRedoHandler.getInstance().add(cmd);
    144144        }
    145145
     
    184184            }
    185185
    186             Main.main.undoRedo.add(cmd);
     186            UndoRedoHandler.getInstance().add(cmd);
    187187        }
    188188
  • applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/model/Turn.java

    r33085 r34566  
    1212import java.util.Set;
    1313
    14 import org.openstreetmap.josm.Main;
     14import org.openstreetmap.josm.data.UndoRedoHandler;
    1515import org.openstreetmap.josm.data.osm.Node;
    1616import org.openstreetmap.josm.data.osm.OsmPrimitive;
     
    196196        remove(cmd);
    197197
    198         Main.main.undoRedo.add(cmd);
     198        UndoRedoHandler.getInstance().add(cmd);
    199199    }
    200200
Note: See TracChangeset for help on using the changeset viewer.