Changeset 20711 in osm for applications
- Timestamp:
- 2010-03-28T12:45:43+02:00 (15 years ago)
- Location:
- applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/list
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/list/TurnRestrictionsInDatasetView.java
r20556 r20711 35 35 DatasetEventManager.getInstance().addDatasetListener((DataSetListener)model, FireMode.IN_EDT); 36 36 if (Main.main.getEditLayer() != null) { 37 model.setTurnRestrictions(Main.main.getEditLayer().data 38 .getRelations()); 37 model.setTurnRestrictions(Main.main.getEditLayer().data.getRelations()); 39 38 } 40 39 } -
applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/list/TurnRestrictionsInSelectionView.java
r20556 r20711 2 2 3 3 import java.awt.BorderLayout; 4 import java.util.Collections; 4 5 5 6 import javax.swing.DefaultListSelectionModel; … … 10 11 import org.openstreetmap.josm.Main; 11 12 import org.openstreetmap.josm.data.SelectionChangedListener; 13 import org.openstreetmap.josm.data.osm.OsmPrimitive; 12 14 import org.openstreetmap.josm.data.osm.event.SelectionEventManager; 13 15 import org.openstreetmap.josm.data.osm.event.DatasetEventManager.FireMode; … … 37 39 MapView.addEditLayerChangeListener((EditLayerChangeListener)model); 38 40 SelectionEventManager.getInstance().addSelectionListener((SelectionChangedListener)model, FireMode.IN_EDT_CONSOLIDATED); 39 if (Main.main.getEditLayer() != null) { 40 model.setTurnRestrictions(Main.main.getEditLayer().data.getRelations()); 41 TurnRestrictionsInSelectionListModel m = (TurnRestrictionsInSelectionListModel)model; 42 if (Main.main.getEditLayer() != null){ 43 m.initFromSelection(Main.main.getEditLayer().data.getSelected()); 44 } else { 45 m.initFromSelection(Collections.<OsmPrimitive>emptyList()); 41 46 } 42 47 } … … 44 49 protected void unregisterAsListener() { 45 50 MapView.removeEditLayerChangeListener((EditLayerChangeListener)model); 46 SelectionEventManager.getInstance().removeSelectionListener((SelectionChangedListener)model); 51 SelectionEventManager.getInstance().removeSelectionListener((SelectionChangedListener)model); 47 52 } 48 53 -
applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/list/TurnRestrictionsListDialog.java
r20666 r20711 191 191 actZoomTo.updateEnabledState(); 192 192 currentListView.revalidate(); 193 currentListView.repaint(); 193 currentListView.repaint(); 194 194 } 195 195
Note:
See TracChangeset
for help on using the changeset viewer.