Changeset 12051 in josm


Ignore:
Timestamp:
2017-05-03T17:48:25+02:00 (17 months ago)
Author:
michael2402
Message:

Trigger JosmAction selection change on edit layer change.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/JosmAction.java

    r11538 r12051  
    1616import org.openstreetmap.josm.data.osm.DataSet;
    1717import org.openstreetmap.josm.data.osm.OsmPrimitive;
     18import org.openstreetmap.josm.data.osm.event.DatasetEventManager.FireMode;
     19import org.openstreetmap.josm.data.osm.event.SelectionEventManager;
    1820import org.openstreetmap.josm.gui.layer.LayerManager.LayerAddEvent;
    1921import org.openstreetmap.josm.gui.layer.LayerManager.LayerChangeListener;
     
    187189        if (listenToSelectionChange()) {
    188190            selectionChangeAdapter = new SelectionChangeAdapter();
    189             DataSet.addSelectionListener(selectionChangeAdapter);
     191            SelectionEventManager.getInstance()
     192                .addSelectionListener(selectionChangeAdapter, FireMode.IN_EDT_CONSOLIDATED);
    190193        }
    191194        initEnabledState();
Note: See TracChangeset for help on using the changeset viewer.