Changeset 33606 in osm for applications/editors/josm
- Timestamp:
- 2017-09-14T23:32:09+02:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/routes/src/org/openstreetmap/josm/plugins/routes/RoutesPlugin.java
r33532 r33606 16 16 import org.openstreetmap.josm.gui.MainApplication; 17 17 import org.openstreetmap.josm.gui.layer.Layer; 18 import org.openstreetmap.josm.gui.layer.LayerManager; 18 19 import org.openstreetmap.josm.gui.layer.LayerManager.LayerAddEvent; 19 20 import org.openstreetmap.josm.gui.layer.LayerManager.LayerChangeListener; … … 80 81 Layer layer = e.getAddedLayer(); 81 82 if (layer instanceof OsmDataLayer) { 83 LayerManager lm = e.getSource(); 82 84 for (RouteLayer routeLayer : routeLayers) { 83 if (! e.getSource().containsLayer(routeLayer)) {85 if (!lm.containsLayer(routeLayer)) { 84 86 SwingUtilities.invokeLater(() -> { 85 e.getSource().addLayer(routeLayer); 87 if (!lm.containsLayer(routeLayer)) { 88 lm.addLayer(routeLayer); 89 } 86 90 }); 87 91 }
Note:
See TracChangeset
for help on using the changeset viewer.