Changeset 29402 in osm for applications
- Timestamp:
- 2013-03-26T06:34:55+01:00 (11 years ago)
- Location:
- applications/editors/josm
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/imagery_offset_db/src/iodb/ImageryOffsetWatcher.java
r29399 r29402 86 86 * Check if the offset state has been changed. 87 87 */ 88 private void checkOffset() {88 private synchronized void checkOffset() { 89 89 if( maxDistance <= 0 ) { 90 90 setOffsetGood(true); … … 123 123 } 124 124 } 125 } 126 127 public void markGood() { 128 ImageryLayer layer = ImageryOffsetTools.getTopImageryLayer(); 129 if( layer != null ) { 130 LatLon center = ImageryOffsetTools.getMapCenter(); 131 Integer hash = layer.hashCode(); 132 ImageryLayerData data = layers.get(hash); 133 if( data == null ) { 134 // create entry for this layer and mark as good 135 data = new ImageryLayerData(); 136 data.lastDx = layer.getDx(); 137 data.lastDy = layer.getDy(); 138 data.lastChecked = center; 139 layers.put(hash, data); 140 } else { 141 data.lastDx = layer.getDx(); 142 data.lastDy = layer.getDy(); 143 data.lastChecked = center; 144 } 145 } 146 setOffsetGood(true); 125 147 } 126 148 -
applications/editors/josm/plugins/imagery_offset_db/src/iodb/OffsetDialog.java
r29394 r29402 243 243 ImageryLayer layer = ImageryOffsetTools.getTopImageryLayer(); 244 244 ImageryOffsetTools.applyLayerOffset(layer, (ImageryOffset)selectedOffset); 245 ImageryOffsetWatcher.getInstance().markGood(); 245 246 Main.map.repaint(); 246 247 if( !Main.pref.getBoolean("iodb.offset.message", false) ) {
Note:
See TracChangeset
for help on using the changeset viewer.