Ignore:
Timestamp:
2016-06-19T16:08:56+02:00 (8 years ago)
Author:
donvip
Message:

fix #josm12953 - Replace most uses of MapView.getActiveLayer and similar methods (patch by michael2402, modified) - gsoc-core

Location:
applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/SdsMenu.java

    r31646 r32329  
    5555
    5656    void setEnabledState() {
    57         boolean en = (Main.map != null) && (Main.map.mapView != null) && (Main.map.mapView.getActiveLayer() instanceof OsmDataLayer);
     57        boolean en = Main.getLayerManager().getActiveLayer() instanceof OsmDataLayer;
    5858        loadItem.setEnabled(en);
    5959        saveItem.setEnabled(en);
  • applications/editors/josm/plugins/sds/src/org/openstreetmap/hot/sds/SdsSaveAction.java

    r30738 r32329  
    3737    public boolean doSave() {
    3838        Layer layer = null;
    39         if (Main.isDisplayingMapView() && (Main.map.mapView.getActiveLayer() instanceof OsmDataLayer))
    40             layer = Main.map.mapView.getActiveLayer();
     39        if (Main.getLayerManager().getActiveLayer() instanceof OsmDataLayer)
     40            layer = Main.getLayerManager().getActiveLayer();
    4141
    4242        if (layer == null)
Note: See TracChangeset for help on using the changeset viewer.