Changeset 33126 in osm for applications/editors/josm/plugins/routes/src
- Timestamp:
- 2017-01-25T01:50:26+01:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/routes/src/org/openstreetmap/josm/plugins/routes/RoutesPlugin.java
r32456 r33126 81 81 private void checkLayers() { 82 82 if (Main.map != null && Main.map.mapView != null) { 83 for (Layer layer :Main.getLayerManager().getLayers()) {83 for (Layer layer : Main.getLayerManager().getLayers()) { 84 84 if (layer instanceof OsmDataLayer) { 85 85 if (!isShown) { 86 86 isShown = true; 87 SwingUtilities.invokeLater(new Runnable() { 88 @Override 89 public void run() { 90 for (RouteLayer routeLayer:routeLayers) { 91 Main.getLayerManager().addLayer(routeLayer); 92 } 87 SwingUtilities.invokeLater(() -> { 88 for (RouteLayer routeLayer : routeLayers) { 89 Main.getLayerManager().addLayer(routeLayer); 93 90 } 94 91 }); … … 99 96 if (isShown) { 100 97 isShown = false; 101 SwingUtilities.invokeLater(new Runnable() { 102 @Override 103 public void run() { 104 for (RouteLayer routeLayer:routeLayers) { 98 SwingUtilities.invokeLater(() -> { 99 for (RouteLayer routeLayer : routeLayers) { 100 if (Main.getLayerManager().containsLayer(routeLayer)) { 105 101 Main.getLayerManager().removeLayer(routeLayer); 106 102 }
Note:
See TracChangeset
for help on using the changeset viewer.