Ignore:
Timestamp:
2016-06-21T00:11:48+02:00 (8 years ago)
Author:
donvip
Message:

remove calls to deprecated methods

Location:
applications/editors/josm/plugins/routing/src/com/innovant/josm/plugin/routing
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/routing/src/com/innovant/josm/plugin/routing/RoutingLayer.java

    r30737 r32349  
    221221    @Override
    222222    public void paint(Graphics2D g, MapView mv, Bounds bounds) {
    223         boolean isActiveLayer = (mv.getActiveLayer().equals(this));
     223        boolean isActiveLayer = (mv.getLayerManager().getActiveLayer().equals(this));
    224224        // Get routing nodes (start, middle, end)
    225225        List<Node> nodes = routingModel.getSelectedNodes();
  • applications/editors/josm/plugins/routing/src/com/innovant/josm/plugin/routing/RoutingPlugin.java

    r30737 r32349  
    174174
    175175    public void addLayer() {
    176         OsmDataLayer osmLayer = Main.main.getEditLayer();
     176        OsmDataLayer osmLayer = Main.getLayerManager().getEditLayer();
    177177        if (osmLayer != null) {
    178178            RoutingLayer layer = new RoutingLayer(tr("Routing") + " [" + osmLayer.getName() + "]", osmLayer);
    179179            layers.add(layer);
    180             Main.main.addLayer(layer);
     180            Main.getLayerManager().addLayer(layer);
    181181        }
    182182    }
     
    256256                    try {
    257257                        // Remove layer
    258                         Main.main.removeLayer(layersArray[i]);
     258                        Main.getLayerManager().removeLayer(layersArray[i]);
    259259                    } catch (IllegalArgumentException e) {
     260                        Main.error(e);
    260261                    }
    261262                }
Note: See TracChangeset for help on using the changeset viewer.