Changeset 12330 in josm


Ignore:
Timestamp:
2017-06-07T22:13:15+02:00 (17 months ago)
Author:
michael2402
Message:

Fix #14854: Run DrawAction selection listener and related UI updates in EDT.

File:
1 edited

Legend:

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

    r12316 r12330  
    3838import org.openstreetmap.josm.command.SequenceCommand;
    3939import org.openstreetmap.josm.data.Bounds;
    40 import org.openstreetmap.josm.data.SelectionChangedListener;
    4140import org.openstreetmap.josm.data.coor.EastNorth;
     41import org.openstreetmap.josm.data.osm.DataSelectionListener;
    4242import org.openstreetmap.josm.data.osm.DataSet;
    4343import org.openstreetmap.josm.data.osm.Node;
     
    4545import org.openstreetmap.josm.data.osm.Way;
    4646import org.openstreetmap.josm.data.osm.WaySegment;
     47import org.openstreetmap.josm.data.osm.event.SelectionEventManager;
    4748import org.openstreetmap.josm.data.osm.visitor.paint.ArrowPaintHelper;
    4849import org.openstreetmap.josm.data.osm.visitor.paint.PaintColors;
     
    7273 * Mapmode to add nodes, create and extend ways.
    7374 */
    74 public class DrawAction extends MapMode implements MapViewPaintable, SelectionChangedListener, KeyPressReleaseListener, ModifierListener {
     75public class DrawAction extends MapMode implements MapViewPaintable, DataSelectionListener, KeyPressReleaseListener, ModifierListener {
    7576
    7677    /**
     
    275276        Main.map.mapView.addMouseMotionListener(this);
    276277        Main.map.mapView.addTemporaryLayer(this);
    277         DataSet.addSelectionListener(this);
     278        SelectionEventManager.getInstance().addSelectionListenerForEdt(this);
    278279
    279280        Main.map.keyDetector.addKeyListener(this);
     
    288289        Main.map.mapView.removeMouseMotionListener(this);
    289290        Main.map.mapView.removeTemporaryLayer(this);
    290         DataSet.removeSelectionListener(this);
     291        SelectionEventManager.getInstance().removeSelectionListener(this);
    291292        Main.unregisterActionShortcut(backspaceAction, backspaceShortcut);
    292293        snapHelper.unsetFixedMode();
     
    339340     */
    340341    @Override
    341     public void selectionChanged(Collection<? extends OsmPrimitive> newSelection) {
     342    public void selectionChanged(SelectionChangeEvent event) {
    342343        if (!Main.map.mapView.isActiveLayerDrawable())
    343344            return;
Note: See TracChangeset for help on using the changeset viewer.