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

Location:
applications/editors/josm/plugins/photoadjust
Files:
2 edited

Legend:

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

    r32015 r32329  
    55    <property name="commit.message" value="Commit message"/>
    66    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    7     <property name="plugin.main.version" value="9416"/>
     7    <property name="plugin.main.version" value="10279"/>
    88
    99    <!-- Configure these properties (replace "..." accordingly).
  • 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.