Changeset 34494 in osm for applications
- Timestamp:
- 2018-08-18T03:01:14+02:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/buildings_tools/src/buildings_tools/DrawBuildingAction.java
r34026 r34494 24 24 import org.openstreetmap.josm.actions.mapmode.MapMode; 25 25 import org.openstreetmap.josm.data.Bounds; 26 import org.openstreetmap.josm.data.SelectionChangedListener;27 26 import org.openstreetmap.josm.data.coor.EastNorth; 28 import org.openstreetmap.josm.data.osm.DataSe t;27 import org.openstreetmap.josm.data.osm.DataSelectionListener; 29 28 import org.openstreetmap.josm.data.osm.Node; 30 29 import org.openstreetmap.josm.data.osm.OsmPrimitive; 31 30 import org.openstreetmap.josm.data.osm.Way; 31 import org.openstreetmap.josm.data.osm.event.SelectionEventManager; 32 32 import org.openstreetmap.josm.data.preferences.NamedColorProperty; 33 33 import org.openstreetmap.josm.gui.MainApplication; … … 43 43 import org.openstreetmap.josm.tools.Shortcut; 44 44 45 @SuppressWarnings("serial") 46 public class DrawBuildingAction extends MapMode implements MapViewPaintable, SelectionChangedListener, 45 public class DrawBuildingAction extends MapMode implements MapViewPaintable, DataSelectionListener, 47 46 KeyPressReleaseListener, ModifierExListener { 48 47 private enum Mode { … … 143 142 map.keyDetector.addKeyListener(this); 144 143 map.keyDetector.addModifierExListener(this); 145 DataSet.addSelectionListener(this);144 SelectionEventManager.getInstance().addSelectionListener(this); 146 145 updateSnap(getLayerManager().getEditDataSet().getSelected()); 147 146 } … … 156 155 map.keyDetector.removeKeyListener(this); 157 156 map.keyDetector.removeModifierExListener(this); 158 DataSet.removeSelectionListener(this);157 SelectionEventManager.getInstance().removeSelectionListener(this); 159 158 if (mode != Mode.None) 160 159 map.mapView.repaint(); … … 491 490 492 491 @Override 493 public void selectionChanged( Collection<? extends OsmPrimitive> newSelection) {494 updateSnap( newSelection);492 public void selectionChanged(SelectionChangeEvent event) { 493 updateSnap(event.getSelection()); 495 494 } 496 495 }
Note:
See TracChangeset
for help on using the changeset viewer.