Ignore:
Timestamp:
2016-06-07T08:22:39+02:00 (8 years ago)
Author:
stoecker
Message:

Do not use deprecated EditLayerChangedListener - patch my Michael Zangl - gsoc-core - fix #12924

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/dialogs/ChangesetDialog.java

    r10179 r10332  
    4343import org.openstreetmap.josm.data.osm.event.DatasetEventManager;
    4444import org.openstreetmap.josm.data.osm.event.DatasetEventManager.FireMode;
    45 import org.openstreetmap.josm.gui.MapView;
    4645import org.openstreetmap.josm.gui.SideButton;
    4746import org.openstreetmap.josm.gui.dialogs.changeset.ChangesetCacheManager;
     
    115114        // let the model for changesets in the current selection listen to various events
    116115        ChangesetCache.getInstance().addChangesetCacheListener(inSelectionModel);
    117         MapView.addEditLayerChangeListener(inSelectionModel);
     116        Main.getLayerManager().addActiveLayerChangeListener(inSelectionModel);
    118117        DataSet.addSelectionListener(inSelectionModel);
    119118
     
    121120        // events and bootstrap it's content
    122121        ChangesetCache.getInstance().addChangesetCacheListener(inActiveDataLayerModel);
    123         MapView.addEditLayerChangeListener(inActiveDataLayerModel);
     122        Main.getLayerManager().addActiveLayerChangeListener(inActiveDataLayerModel);
    124123        OsmDataLayer editLayer = Main.main.getEditLayer();
    125124        if (editLayer != null) {
     
    134133        //
    135134        ChangesetCache.getInstance().removeChangesetCacheListener(inActiveDataLayerModel);
    136         MapView.removeEditLayerChangeListener(inActiveDataLayerModel);
     135        Main.getLayerManager().removeActiveLayerChangeListener(inActiveDataLayerModel);
    137136        OsmDataLayer editLayer = Main.main.getEditLayer();
    138137        if (editLayer != null) {
     
    143142        // listener
    144143        //
    145         MapView.removeEditLayerChangeListener(inSelectionModel);
     144        Main.getLayerManager().removeActiveLayerChangeListener(inSelectionModel);
    146145        DataSet.removeSelectionListener(inSelectionModel);
    147146    }
Note: See TracChangeset for help on using the changeset viewer.