Index: trunk/src/org/openstreetmap/josm/actions/ImageryAdjustAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/ImageryAdjustAction.java	(revision 3779)
+++ trunk/src/org/openstreetmap/josm/actions/ImageryAdjustAction.java	(revision 3780)
@@ -212,11 +212,17 @@
         @Override
         protected void buttonAction(int buttonIndex, ActionEvent evt) {
-            if (buttonIndex != 1 && tBookmarkName.getText() != null && !"".equals(tBookmarkName.getText()) &&
+            if (buttonIndex == 0 && tBookmarkName.getText() != null && !"".equals(tBookmarkName.getText()) &&
                     OffsetBookmark.getBookmarkByName(layer, tBookmarkName.getText()) != null) {
                 if (!confirmOverwriteBookmark()) return;
             }
             super.buttonAction(buttonIndex, evt);
+        }
+
+        @Override
+        public void setVisible(boolean visible) {
+            super.setVisible(visible);
+            if (visible) return;
             offsetDialog = null;
-            if (buttonIndex == 1) {
+            if (getValue() != 1) {
                 layer.setOffset(oldDx, oldDy);
             } else if (tBookmarkName.getText() != null && !"".equals(tBookmarkName.getText())) {
