Changeset 17174 in osm for applications/editors/josm


Ignore:
Timestamp:
2009-08-19T17:35:27+02:00 (15 years ago)
Author:
dmuecke
Message:

Fixed issue #3256. Removal of Validator layer when OSM data layer gets removed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/ErrorLayer.java

    r16788 r17174  
    2020import org.openstreetmap.josm.gui.dialogs.LayerListPopup;
    2121import org.openstreetmap.josm.gui.layer.Layer;
     22import org.openstreetmap.josm.gui.layer.OsmDataLayer;
    2223import org.openstreetmap.josm.gui.layer.Layer.LayerChangeListener;
    2324import org.openstreetmap.josm.plugins.validator.util.Bag;
     
    133134     */
    134135    public void layerRemoved(Layer oldLayer) {
    135         if (oldLayer == Main.map.mapView.getEditLayer()) {
     136        if (oldLayer instanceof OsmDataLayer &&  Main.map.mapView.getEditLayer() == null) {
     137            System.out.println("inside removeLayer");
    136138            Main.map.mapView.removeLayer(this);
    137139        } else if (oldLayer == this) {
Note: See TracChangeset for help on using the changeset viewer.