Changeset 12134 in josm for trunk/src/org/openstreetmap/josm/gui/layer/imagery
- Timestamp:
- 2017-05-13T12:58:12+02:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/layer/imagery/TileSourceDisplaySettings.java
r12117 r12134 248 248 /** 249 249 * Stores the current settings object to the given hashmap. 250 * The offset data is not stored and needs to be handled separately. 250 251 * @param data The map to store the settings to. 251 252 * @see #loadFrom(Map) 253 * @see OffsetBookmark#toPropertiesMap() 252 254 */ 253 255 public void storeTo(Map<String, String> data) { … … 255 257 data.put(AUTO_ZOOM, Boolean.toString(autoZoom)); 256 258 data.put(SHOW_ERRORS, Boolean.toString(showErrors)); 257 data.put("dx", String.valueOf(getDx()));258 data.put("dy", String.valueOf(getDy()));259 259 } 260 260 261 261 /** 262 262 * Load the settings from the given data instance. 263 * The offset data is not loaded and needs to be handled separately. 263 264 * @param data The data 264 265 * @see #storeTo(Map) 266 * @see OffsetBookmark#fromPropertiesMap(java.util.Map) 265 267 */ 266 268 public void loadFrom(Map<String, String> data) { … … 279 281 if (doShowErrors != null) { 280 282 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)));287 283 } 288 284 } catch (JosmRuntimeException | IllegalArgumentException | IllegalStateException e) {
Note:
See TracChangeset
for help on using the changeset viewer.