Ignore:
Timestamp:
2014-06-01T12:38:10+02:00 (10 years ago)
Author:
bastiK
Message:

fixed #10088 - Can't use custom TMS layer anymore (see #9914)

Location:
trunk/src/org/openstreetmap/josm/data/imagery
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/imagery/ImageryInfo.java

    r7186 r7203  
    1111import java.util.List;
    1212import java.util.Objects;
     13import java.util.TreeSet;
    1314import java.util.regex.Matcher;
    1415import java.util.regex.Pattern;
     
    485486        int i = countryCode.compareTo(in.countryCode);
    486487        if (i == 0) {
    487             i = name.compareTo(in.name);
     488            i = name.toLowerCase().compareTo(in.name.toLowerCase());
    488489        }
    489490        if (i == 0) {
     
    695696        this.id = id;
    696697    }
     698   
     699    public void clearId() {
     700        if (this.id != null) {
     701            Collection<String> newAddedIds = new TreeSet<>(Main.pref.getCollection("imagery.layers.addedIds"));
     702            newAddedIds.add(this.id);
     703            Main.pref.putCollection("imagery.layers.addedIds", newAddedIds);
     704        }
     705        this.id = null;
     706    }
    697707
    698708    /**
  • trunk/src/org/openstreetmap/josm/data/imagery/ImageryLayerInfo.java

    r7186 r7203  
    178178            }
    179179        }
    180         Main.pref.putCollection("imagery.layers.migration.addedIds", newAddedIds);
     180        Main.pref.putCollection("imagery.layers.addedIds", newAddedIds);
    181181       
    182182        // automatically update user entries with same id as a default entry
Note: See TracChangeset for help on using the changeset viewer.