Changeset 13269 in josm for trunk/src/org
- Timestamp:
- 2018-01-01T21:34:45+01:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/ImageryAdjustAction.java
r13243 r13269 15 15 import java.awt.event.KeyEvent; 16 16 import java.awt.event.MouseEvent; 17 import java.awt.event.WindowAdapter;18 import java.awt.event.WindowEvent;19 17 import java.util.Formatter; 20 18 import java.util.Locale; … … 226 224 tr("Adjust imagery offset"), 227 225 new String[] {tr("OK"), tr("Cancel")}, 228 false );226 false, false); // Do not dispose on close, so HIDE_ON_CLOSE remains the default behaviour and setVisible is called 229 227 setButtonIcons("ok", "cancel"); 230 228 contentInsets = new Insets(10, 15, 5, 15); … … 243 241 setContent(pnl); 244 242 setupDialog(); 245 addWindowListener(new WindowEventHandler());246 243 setRememberWindowGeometry(getClass().getName() + ".geometry", WindowGeometry.centerInWindow(Main.parent, getSize())); 247 244 } … … 275 272 } 276 273 updateOffsetIntl(); 277 if (MainApplication.isDisplayingMapView()) { 278 MainApplication.getMap().repaint(); 279 } 274 layer.invalidate(); 280 275 } 281 276 … … 323 318 } 324 319 super.buttonAction(buttonIndex, evt); 325 restoreMapModeState();326 320 } 327 321 … … 340 334 } 341 335 MainApplication.getMenu().imageryMenu.refreshOffsetMenu(); 336 restoreMapModeState(); 342 337 } 343 338 … … 349 344 map.selectMapMode(oldMapMode); 350 345 oldMapMode = null; 351 } else { 352 map.selectSelectTool(false); 353 } 354 } 355 356 class WindowEventHandler extends WindowAdapter { 357 @Override 358 public void windowClosing(WindowEvent e) { 359 setVisible(false); 360 restoreMapModeState(); 346 } else if (!map.selectSelectTool(false)) { 347 exitMode(); 348 map.mapMode = null; 361 349 } 362 350 }
Note:
See TracChangeset
for help on using the changeset viewer.