- Timestamp:
- 2015-10-10T19:28:35+02:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/AddImageryLayerAction.java
r8846 r8853 154 154 } 155 155 156 protected boolean isLayerAlreadyPresent() {157 if (Main.isDisplayingMapView()) {158 for (ImageryLayer layer : Main.map.mapView.getLayersOfType(ImageryLayer.class)) {159 if (info.equals(layer.getInfo())) {160 return true;161 }162 }163 }164 return false;165 }166 167 156 @Override 168 157 protected void updateEnabledState() { 169 158 ImageryType type = info.getImageryType(); 170 159 // never enable blacklisted entries. Do not add same imagery layer twice (fix #2519) 171 if (info.isBlacklisted() /*|| isLayerAlreadyPresent()*/) { 172 // FIXME check disabled to allow several instances with different settings (see #7981) 160 if (info.isBlacklisted()) { 173 161 setEnabled(false); 174 162 } else if (type == ImageryType.TMS || type == ImageryType.BING || type == ImageryType.SCANEX) {
Note:
See TracChangeset
for help on using the changeset viewer.