Changeset 10669 in josm for trunk


Ignore:
Timestamp:
2016-07-28T23:47:16+02:00 (4 years ago)
Author:
Don-vip
Message:

fix #13237 - Should not duplicate layer names in the changeset source

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/MapView.java

    r10634 r10669  
    3030import java.util.List;
    3131import java.util.Set;
     32import java.util.TreeSet;
    3233import java.util.concurrent.CopyOnWriteArrayList;
    3334
     
    12861287     */
    12871288    public String getLayerInformationForSourceTag() {
    1288         final Collection<String> layerInfo = new ArrayList<>();
    1289         if (!getLayersOfType(GpxLayer.class).isEmpty()) {
     1289        final Set<String> layerInfo = new TreeSet<>();
     1290        if (!layerManager.getLayersOfType(GpxLayer.class).isEmpty()) {
    12901291            // no i18n for international values
    12911292            layerInfo.add("survey");
    12921293        }
    1293         for (final GeoImageLayer i : getLayersOfType(GeoImageLayer.class)) {
     1294        for (final GeoImageLayer i : layerManager.getLayersOfType(GeoImageLayer.class)) {
    12941295            if (i.isVisible()) {
    12951296                layerInfo.add(i.getName());
    12961297            }
    12971298        }
    1298         for (final ImageryLayer i : getLayersOfType(ImageryLayer.class)) {
     1299        for (final ImageryLayer i : layerManager.getLayersOfType(ImageryLayer.class)) {
    12991300            if (i.isVisible()) {
    13001301                layerInfo.add(ImageryInfo.ImageryType.BING.equals(i.getInfo().getImageryType()) ? "Bing" : i.getName());
Note: See TracChangeset for help on using the changeset viewer.