Index: /trunk/src/org/openstreetmap/josm/actions/ImageryAdjustAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/ImageryAdjustAction.java	(revision 10929)
+++ /trunk/src/org/openstreetmap/josm/actions/ImageryAdjustAction.java	(revision 10930)
@@ -92,4 +92,5 @@
             }
             offsetDialog.setVisible(false);
+            // do not restore old mode here - this is called when the new mode is already known.
             offsetDialog = null;
         }
@@ -301,7 +302,10 @@
             }
             Main.main.menu.imageryMenu.refreshOffsetMenu();
+        }
+
+        private void restoreMapModeState() {
             if (Main.map == null)
                 return;
-            if (oldMapMode != null) {
+            if (oldMapMode != null ) {
                 Main.map.selectMapMode(oldMapMode);
                 oldMapMode = null;
@@ -315,4 +319,5 @@
             public void windowClosing(WindowEvent e) {
                 setVisible(false);
+                restoreMapModeState();
             }
         }
