Ignore:
Timestamp:
2016-07-20T00:15:30+02:00 (8 years ago)
Author:
Don-vip
Message:

fix #13169 - Extract imagery layer settings to new class (patch by michael2402, modified) - gsoc-core

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/io/session/ImagerySessionImporter.java

    r9455 r10568  
    5151        ImageryLayer layer = ImageryLayer.create(i);
    5252        if (layer instanceof AbstractTileSourceLayer) {
    53             AbstractTileSourceLayer tsLayer = (AbstractTileSourceLayer) layer;
    54             if (attributes.containsKey("automatic-downloading")) {
    55                 tsLayer.autoLoad = Boolean.parseBoolean(attributes.get("automatic-downloading"));
    56             }
    57 
    58             if (attributes.containsKey("automatically-change-resolution")) {
    59                 tsLayer.autoZoom = Boolean.parseBoolean(attributes.get("automatically-change-resolution"));
    60             }
    61 
    62             if (attributes.containsKey("show-errors")) {
    63                 tsLayer.showErrors = Boolean.parseBoolean(attributes.get("show-errors"));
    64             }
     53            AbstractTileSourceLayer<?> tsLayer = (AbstractTileSourceLayer<?>) layer;
     54            tsLayer.getDisplaySettings().loadFrom(attributes);
    6555        }
    6656        if (attributes.containsKey("dx") && attributes.containsKey("dy")) {
Note: See TracChangeset for help on using the changeset viewer.