Ignore:
Timestamp:
2009-12-12T18:46:54+01:00 (15 years ago)
Author:
guggis
Message:

'Updated to JOSM 2621'

Location:
applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator
Files:
2 edited

Legend:

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

    r18593 r19072  
    1818import org.openstreetmap.josm.data.osm.visitor.BoundingXYVisitor;
    1919import org.openstreetmap.josm.gui.MapView;
     20import org.openstreetmap.josm.gui.MapView.LayerChangeListener;
    2021import org.openstreetmap.josm.gui.dialogs.LayerListDialog;
    2122import org.openstreetmap.josm.gui.dialogs.LayerListPopup;
    2223import org.openstreetmap.josm.gui.layer.Layer;
    2324import org.openstreetmap.josm.gui.layer.OsmDataLayer;
    24 import org.openstreetmap.josm.gui.layer.Layer.LayerChangeListener;
    2525import org.openstreetmap.josm.plugins.validator.util.Bag;
    2626import org.openstreetmap.josm.tools.ImageProvider;
     
    3737        super(tr("Validation errors"));
    3838        this.plugin = plugin;
    39         Layer.listeners.add(this);
     39        MapView.addLayerChangeListener(this);
    4040    }
    4141
     
    138138            Main.map.mapView.removeLayer(this);
    139139        } else if (oldLayer == this) {
     140            MapView.removeLayerChangeListener(this);
    140141            OSMValidatorPlugin.errorLayer = null;
    141142        }
  • applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/OSMValidatorPlugin.java

    r18152 r19072  
    3030import org.openstreetmap.josm.data.projection.Mercator;
    3131import org.openstreetmap.josm.gui.MapFrame;
     32import org.openstreetmap.josm.gui.MapView;
     33import org.openstreetmap.josm.gui.MapView.LayerChangeListener;
    3234import org.openstreetmap.josm.gui.layer.Layer;
    3335import org.openstreetmap.josm.gui.layer.OsmDataLayer;
    34 import org.openstreetmap.josm.gui.layer.Layer.LayerChangeListener;
    3536import org.openstreetmap.josm.gui.preferences.PreferenceSetting;
    3637import org.openstreetmap.josm.plugins.Plugin;
     
    167168            if (Main.pref.hasKey(PreferenceEditor.PREF_DEBUG + ".grid"))
    168169                Main.main.addLayer(new GridLayer(tr("Grid")));
    169             Layer.listeners.add(this);
     170            MapView.addLayerChangeListener(this);           
    170171        } else
    171             Layer.listeners.remove(this);
    172 
     172                MapView.removeLayerChangeListener(this);
    173173        if (newFrame != null) {
    174174                UploadAction.registerUploadHook(uploadHook = new ValidateUploadHook(this));
Note: See TracChangeset for help on using the changeset viewer.