Ignore:
Timestamp:
2016-07-26T00:18:38+02:00 (8 years ago)
Author:
donvip
Message:

fix #josm13209 - photoadjust plugin error: "Attempted to remove listener that was not in list"

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/photoadjust/src/org/openstreetmap/josm/plugins/photoadjust/PhotoAdjustMapMode.java

    r32451 r32712  
    5555        initAdapters();
    5656        this.worker = worker;
    57         Main.getLayerManager().addLayerChangeListener(this);
    58         Main.getLayerManager().addActiveLayerChangeListener(this);
    5957    }
    6058
     
    135133        super.enterMode();
    136134        modeSelected = true;
    137         // Activate the mode only if the current layer is not a
    138         // GeoImageLayer.  GeoImageLayer's are handled by the plug-in directly.
    139         if (! (Main.getLayerManager().getActiveLayer() instanceof GeoImageLayer)) {
     135        Main.getLayerManager().addLayerChangeListener(this);
     136        Main.getLayerManager().addActiveLayerChangeListener(this);
     137        // Activate the mode only if the current layer is not a GeoImageLayer.
     138        // GeoImageLayer's are handled by the plug-in directly.
     139        if (!(Main.getLayerManager().getActiveLayer() instanceof GeoImageLayer)) {
    140140            activateMode();
    141141        }
Note: See TracChangeset for help on using the changeset viewer.