Ignore:
Timestamp:
2015-10-10T19:28:35+02:00 (9 years ago)
Author:
Don-vip
Message:

see #2519 - remove unused code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/AddImageryLayerAction.java

    r8846 r8853  
    154154    }
    155155
    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 
    167156    @Override
    168157    protected void updateEnabledState() {
    169158        ImageryType type = info.getImageryType();
    170159        // 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()) {
    173161            setEnabled(false);
    174162        } else if (type == ImageryType.TMS || type == ImageryType.BING || type == ImageryType.SCANEX) {
Note: See TracChangeset for help on using the changeset viewer.