Changeset 19054 in osm for applications/editors/josm/plugins/graphview/src/org
- Timestamp:
- 2009-12-12T18:08:41+01:00 (15 years ago)
- Location:
- applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/plugin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/plugin/GraphViewPlugin.java
r17210 r19054 16 16 import org.openstreetmap.josm.Main; 17 17 import org.openstreetmap.josm.gui.MapFrame; 18 import org.openstreetmap.josm.gui.MapView; 19 import org.openstreetmap.josm.gui.MapView.LayerChangeListener; 18 20 import org.openstreetmap.josm.gui.layer.Layer; 19 import org.openstreetmap.josm.gui.layer.Layer.LayerChangeListener;20 21 import org.openstreetmap.josm.gui.preferences.PreferenceSetting; 21 22 import org.openstreetmap.josm.plugins.Plugin; … … 236 237 newFrame.addToggleDialog(laneDialog); 237 238 } 238 Layer.listeners.add(this);239 MapView.addLayerChangeListener(this); 239 240 } else { 240 Layer.listeners.remove(this);241 MapView.removeLayerChangeListener(this); 241 242 } 242 243 } -
applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/plugin/layer/GraphViewLayer.java
r18593 r19054 24 24 import org.openstreetmap.josm.data.osm.visitor.BoundingXYVisitor; 25 25 import org.openstreetmap.josm.gui.MapView; 26 import org.openstreetmap.josm.gui.MapView.LayerChangeListener; 26 27 import org.openstreetmap.josm.gui.dialogs.LayerListDialog; 27 28 import org.openstreetmap.josm.gui.dialogs.LayerListPopup; 28 29 import org.openstreetmap.josm.gui.layer.Layer; 29 import org.openstreetmap.josm.gui.layer.Layer.LayerChangeListener;30 30 import org.openstreetmap.josm.plugins.graphview.core.graph.GraphEdge; 31 31 import org.openstreetmap.josm.plugins.graphview.core.graph.GraphNode; … … 84 84 public GraphViewLayer() { 85 85 super("Graph view"); 86 Layer.listeners.add(this);86 MapView.addLayerChangeListener(this); 87 87 } 88 88 … … 343 343 } 344 344 public void layerRemoved(Layer oldLayer) { 345 //do nothing 345 if (oldLayer == this) { 346 MapView.removeLayerChangeListener(this); 347 } 346 348 } 347 349 }
Note:
See TracChangeset
for help on using the changeset viewer.