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

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/irsrectify/src/irsrectify/IRSRectifyPlugin.java

    r27852 r32329  
    7474            data.data.addPrimitive(way);
    7575            data.data.setSelected(way.getPrimitiveId());
    76             frame.mapView.setActiveLayer(data);
     76            Main.getLayerManager().setActiveLayer(data);
    7777        }
    7878
     
    8080            if( frame == null || frame.mapView == null )
    8181                return null;
    82             for( Layer l : frame.mapView.getAllLayers() )
     82            for( Layer l : Main.getLayerManager().getLayers() )
    8383                if( l instanceof ImageryLayer )
    8484                    return (ImageryLayer)l;
     
    9090                return null;
    9191
    92             OsmDataLayer l = frame.mapView.getEditLayer();
     92            OsmDataLayer l = Main.getLayerManager().getEditLayer();
    9393            if( isOffsetLayer(l) )
    9494                return l;
    9595
    9696            // try to find among all layers
    97             for( Layer layer : frame.mapView.getAllLayers() )
     97            for( Layer layer : Main.getLayerManager().getLayers() )
    9898                if( layer instanceof OsmDataLayer && isOffsetLayer((OsmDataLayer)layer) )
    9999                    return (OsmDataLayer) layer;
Note: See TracChangeset for help on using the changeset viewer.