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/photoadjust/src/org/openstreetmap/josm/plugins/photoadjust/PhotoAdjustMapMode.java

    r31962 r32329  
    133133        // GeoImageLayer.  GeoImageLayer's are handled by the plug-in
    134134        // directly.
    135         if (! (Main.map.mapView.getActiveLayer() instanceof GeoImageLayer)) {
     135        if (! (Main.getLayerManager().getActiveLayer() instanceof GeoImageLayer)) {
    136136            activateMode();
    137137        }
     
    208208    private boolean hasLayersToAdjust() {
    209209        if (Main.map == null || Main.map.mapView == null) return false;
    210         return ! Main.map.mapView.getLayersOfType(GeoImageLayer.class).isEmpty();
     210        return ! Main.getLayerManager().getLayersOfType(GeoImageLayer.class).isEmpty();
    211211    }
    212212
     
    217217     */
    218218    private List<GeoImageLayer> getVisibleGeoImageLayers() {
    219         List<GeoImageLayer> all = new ArrayList<>(Main.map.mapView.getLayersOfType(GeoImageLayer.class));
     219        List<GeoImageLayer> all = new ArrayList<>(Main.getLayerManager().getLayersOfType(GeoImageLayer.class));
    220220        Iterator<GeoImageLayer> it = all.iterator();
    221221        while (it.hasNext()) {
Note: See TracChangeset for help on using the changeset viewer.