Changeset 34288 in osm for applications
- Timestamp:
- 2018-06-13T18:46:07+02:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/gui/TurnLanesDialog.java
r34146 r34288 19 19 20 20 import org.openstreetmap.josm.actions.JosmAction; 21 import org.openstreetmap.josm.data.SelectionChangedListener; 22 import org.openstreetmap.josm.data.osm.DataSet; 21 import org.openstreetmap.josm.data.osm.DataSelectionListener; 23 22 import org.openstreetmap.josm.data.osm.Node; 24 23 import org.openstreetmap.josm.data.osm.OsmPrimitive; … … 31 30 import org.openstreetmap.josm.data.osm.event.PrimitivesRemovedEvent; 32 31 import org.openstreetmap.josm.data.osm.event.RelationMembersChangedEvent; 32 import org.openstreetmap.josm.data.osm.event.SelectionEventManager; 33 33 import org.openstreetmap.josm.data.osm.event.TagsChangedEvent; 34 34 import org.openstreetmap.josm.data.osm.event.WayNodesChangedEvent; … … 40 40 import org.openstreetmap.josm.plugins.turnlanes.model.ModelContainer; 41 41 42 public class TurnLanesDialog extends ToggleDialog implements ActiveLayerChangeListener, SelectionChangedListener {42 public class TurnLanesDialog extends ToggleDialog implements ActiveLayerChangeListener, DataSelectionListener { 43 43 private class EditAction extends JosmAction { 44 44 private static final long serialVersionUID = 4114119073563457706L; … … 148 148 149 149 MainApplication.getLayerManager().addActiveLayerChangeListener(this); 150 DataSet.addSelectionListener(this);150 SelectionEventManager.getInstance().addSelectionListener(this); 151 151 152 152 final JPanel buttonPanel = new JPanel(new GridLayout(1, 2, 4, 4)); … … 202 202 203 203 @Override 204 public void selectionChanged( Collection<? extends OsmPrimitive> newSelection) {205 if (selected.equals(new HashSet<>( newSelection))) {204 public void selectionChanged(SelectionChangeEvent event) { 205 if (selected.equals(new HashSet<>(event.getSelection()))) { 206 206 return; 207 207 } 208 208 selected.clear(); 209 selected.addAll( newSelection);209 selected.addAll(event.getSelection()); 210 210 211 211 refresh(); … … 216 216 super.destroy(); 217 217 MainApplication.getLayerManager().removeActiveLayerChangeListener(this); 218 DataSet.removeSelectionListener(this);218 SelectionEventManager.getInstance().removeSelectionListener(this); 219 219 editAction.destroy(); 220 220 validateAction.destroy();
Note:
See TracChangeset
for help on using the changeset viewer.