Changeset 24675 in osm
- Timestamp:
- 2010-12-09T23:36:36+01:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/imagery/src/org/openstreetmap/josm/plugins/imagery/ImageryAdjustAction.java
r24672 r24675 35 35 EastNorth prevEastNorth; 36 36 private ImageryLayer layer; 37 private MapMode oldMapMode; 37 38 38 39 public ImageryAdjustAction(ImageryLayer layer) { … … 102 103 @Override 103 104 public void actionPerformed(ActionEvent e) { 104 if (offsetDialog != null || layer == null )105 if (offsetDialog != null || layer == null || Main.map == null) 105 106 return; 107 oldMapMode = Main.map.mapMode; 106 108 super.actionPerformed(e); 107 109 } … … 156 158 super.buttonAction(buttonIndex, evt); 157 159 offsetDialog = null; 158 if (buttonIndex == 2) {160 if (buttonIndex == 1) { 159 161 layer.setOffset(oldDx, oldDy); 160 162 } else if (tBookmarkName.getText() != null && !"".equals(tBookmarkName.getText())) { … … 167 169 } 168 170 ImageryPlugin.instance.refreshOffsetMenu(); 169 Main.map.selectSelectTool(false); 171 if (Main.map == null) return; 172 if (oldMapMode != null) { 173 Main.map.selectMapMode(oldMapMode); 174 oldMapMode = null; 175 } else { 176 Main.map.selectSelectTool(false); 177 } 170 178 } 171 179 }
Note:
See TracChangeset
for help on using the changeset viewer.