Changeset 8763 in josm


Ignore:
Timestamp:
2015-09-17T19:39:11+02:00 (9 years ago)
Author:
wiktorn
Message:

Fix layer naming for wms_endpoint layers and caching issues stemming from same named layers.

Closes: #11872.

File:
1 edited

Legend:

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

    r8582 r8763  
    123123            Set<String> supportedCrs = new HashSet<>();
    124124            boolean first = true;
     125            StringBuilder layersString = new StringBuilder();
    125126            for (LayerDetails layer: tree.getSelectedLayers()) {
    126127                if (first) {
     
    128129                    first = false;
    129130                }
     131                layersString.append(layer.name);
     132                layersString.append(", ");
    130133                supportedCrs.retainAll(layer.getProjections());
    131134            }
     135
    132136            ImageryInfo ret = new ImageryInfo(info.getName(), url, "wms", info.getEulaAcceptanceRequired(), info.getCookies());
     137            if (layersString.length() > 2) {
     138                ret.setName(ret.getName() + " " + layersString.substring(0, layersString.length() - 2));
     139            }
    133140            ret.setServerProjections(supportedCrs);
    134141            return ret;
Note: See TracChangeset for help on using the changeset viewer.