Ignore:
Timestamp:
2017-05-13T12:58:12+02:00 (7 years ago)
Author:
bastiK
Message:

see #14773 - improve session export/import for imagery layer offset data

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/layer/imagery/TileSourceDisplaySettings.java

    r12117 r12134  
    248248    /**
    249249     * Stores the current settings object to the given hashmap.
     250     * The offset data is not stored and needs to be handled separately.
    250251     * @param data The map to store the settings to.
    251252     * @see #loadFrom(Map)
     253     * @see OffsetBookmark#toPropertiesMap()
    252254     */
    253255    public void storeTo(Map<String, String> data) {
     
    255257        data.put(AUTO_ZOOM, Boolean.toString(autoZoom));
    256258        data.put(SHOW_ERRORS, Boolean.toString(showErrors));
    257         data.put("dx", String.valueOf(getDx()));
    258         data.put("dy", String.valueOf(getDy()));
    259259    }
    260260
    261261    /**
    262262     * Load the settings from the given data instance.
     263     * The offset data is not loaded and needs to be handled separately.
    263264     * @param data The data
    264265     * @see #storeTo(Map)
     266     * @see OffsetBookmark#fromPropertiesMap(java.util.Map)
    265267     */
    266268    public void loadFrom(Map<String, String> data) {
     
    279281            if (doShowErrors != null) {
    280282                setShowErrors(Boolean.parseBoolean(doShowErrors));
    281             }
    282 
    283             String dx = data.get("dx");
    284             String dy = data.get("dy");
    285             if (dx != null && dy != null) {
    286                 setDisplacement(new EastNorth(Double.parseDouble(dx), Double.parseDouble(dy)));
    287283            }
    288284        } catch (JosmRuntimeException | IllegalArgumentException | IllegalStateException e) {
Note: See TracChangeset for help on using the changeset viewer.