Ignore:
Timestamp:
2016-06-30T23:48:10+02:00 (8 years ago)
Author:
donvip
Message:

remove calls to deprecated methods

Location:
applications/editors/josm/plugins/public_transport_layer/src/ptl
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/public_transport_layer/src/ptl/DistanceBetweenStops.java

    r32142 r32475  
    5252        for (int i = 0; i < links.size(); i++) {
    5353            final WayConnectionType link = links.get(i);
    54             final WayConnectionType.Direction direction = link.direction;
    5554            final List<Node> nodes = routeSegments.get(i).getWay().getNodes();
    5655            switch (link.direction) {
     
    131130    @Override
    132131    public void actionPerformed(ActionEvent e) {
    133         if (getCurrentDataSet() == null) {
     132        if (getLayerManager().getEditDataSet() == null) {
    134133            return;
    135134        }
    136135        final StringBuilder sb = new StringBuilder();
    137         for (Relation relation : getCurrentDataSet().getSelectedRelations()) {
     136        for (Relation relation : getLayerManager().getEditDataSet().getSelectedRelations()) {
    138137            if (!isRouteSupported(relation)) {
    139138                JOptionPane.showMessageDialog(Main.parent, "<html>" + tr("A valid public_transport:version=2 route is required")
  • applications/editors/josm/plugins/public_transport_layer/src/ptl/PublicTransportLayer.java

    r31932 r32475  
    4646    @Override
    4747    public void paint(Graphics2D g, MapView mv, Bounds box) {
    48         if (mv == null || mv.getEditLayer() == null || mv.getEditLayer().data.selectionEmpty()) {
     48        if (mv == null || mv.getLayerManager().getEditLayer() == null || mv.getLayerManager().getEditLayer().data.selectionEmpty()) {
    4949            return;
    5050        }
    5151        final StyledMapRenderer renderer = new StyledMapRenderer(g, mv, false);
    5252
    53         final Collection<Relation> selectedRelations = mv.getEditLayer().data.getSelectedRelations();
     53        final Collection<Relation> selectedRelations = mv.getLayerManager().getEditLayer().data.getSelectedRelations();
    5454        final MultiMap<Pair<Node, Node>, String> segmentRefs = new MultiMap<>();
    5555        for (final Relation relation : selectedRelations) {
     
    151151        @Override
    152152        public void actionPerformed(ActionEvent e) {
    153             Main.main.addLayer(new PublicTransportLayer());
     153            Main.getLayerManager().addLayer(new PublicTransportLayer());
    154154        }
    155155    }
Note: See TracChangeset for help on using the changeset viewer.