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/imageryadjust
Files:
2 edited

Legend:

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

    r31923 r32329  
    22<project name="imageryadjust" default="dist" basedir=".">
    33    <property name="commit.message" value="ImageryAdjust: Adjust while holding shortcut key"/>
    4     <property name="plugin.main.version" value="7001"/>
     4    <property name="plugin.main.version" value="10279"/>
    55
    66    <property name="plugin.author" value="Upliner"/>
  • applications/editors/josm/plugins/imageryadjust/src/imageryadjust/ImageryAdjustMapMode.java

    r31690 r32329  
    5454   
    5555    private List<? extends Layer> getVisibleLayers() {
    56         List<? extends Layer> all = new ArrayList<Layer>(Main.map.mapView.getLayersOfType(ImageryLayer.class));
     56        List<? extends Layer> all = new ArrayList<Layer>(Main.getLayerManager().getLayersOfType(ImageryLayer.class));
    5757        Iterator<? extends Layer> it = all.iterator();
    5858        while (it.hasNext()) {
     
    7676            return;
    7777        }
    78         List<ImageryLayer> layers = Main.map.mapView.getLayersOfType(ImageryLayer.class);
     78        List<ImageryLayer> layers = Main.getLayerManager().getLayersOfType(ImageryLayer.class);
    7979        if (layers.size() == 1) {
    8080            adjustingLayer = layers.get(0);
     
    159159            if (Main.map.mapView == null)
    160160                return false;
    161             return Main.map.mapView.getActiveLayer() == layer;
     161            return Main.getLayerManager().getActiveLayer() == layer;
    162162        }
    163163
     
    230230        if (Main.map == null) return false;
    231231        if (Main.map.mapView == null) return false;
    232         boolean b = ! Main.map.mapView.getLayersOfType(ImageryLayer.class).isEmpty();
     232        boolean b = ! Main.getLayerManager().getLayersOfType(ImageryLayer.class).isEmpty();
    233233        return b;
    234234    }
Note: See TracChangeset for help on using the changeset viewer.