Index: src/org/openstreetmap/josm/gui/ConditionalOptionPaneUtil.java
===================================================================
--- src/org/openstreetmap/josm/gui/ConditionalOptionPaneUtil.java	(revision 2514)
+++ src/org/openstreetmap/josm/gui/ConditionalOptionPaneUtil.java	(working copy)
@@ -55,6 +55,27 @@
     }
 
     /**
+     * Returns the preference value for the preference key "message." + <code>prefKey</code> + ".value".
+     * The default value if the preference key is missing is -1.
+     *
+     * @param  the preference key
+     * @return prefKey the preference value for the preference key "message." + <code>prefKey</code> + ".value"
+     */
+    public static Integer getDialogReturnValue(String prefKey) {
+        return Main.pref.getInteger("message."+prefKey+".value", -1);
+    }
+
+    /**
+     * sets the value for the preference key "message." + <code>prefKey</code> + ".value".
+     *
+     * @param prefKey the key
+     * @param value the value
+     */
+    public static void setDialogReturnValue(String prefKey, Integer value) {
+        Main.pref.putInteger("message."+prefKey+".value", value);
+    }
+
+    /**
      * Displays an confirmation dialog with some option buttons given by <code>optionType</code>.
      * It is always on top even if there are other open windows like detached dialogs,
      * relation editors, history browsers and the like.
@@ -123,11 +144,14 @@
      * @see JOptionPane#ERROR_MESSAGE
      */
     static public boolean showConfirmationDialog(String preferenceKey, Component parent, Object message, String title, int optionType, int messageType, int trueOption) throws HeadlessException {
-        if (!getDialogShowingEnabled(preferenceKey))
-            return true;
+        if (!getDialogShowingEnabled(preferenceKey) && (getDialogReturnValue(preferenceKey) >= 0))
+            return getDialogReturnValue(preferenceKey) == trueOption;
         MessagePanel pnl = new MessagePanel(preferenceKey, message);
         int ret = JOptionPane.showConfirmDialog(parent, pnl, title, optionType, messageType);
-        pnl.remeberDialogShowingEnabled();
+        if ((ret >= 0) && !pnl.getDialogShowingEnabled()) {
+            setDialogShowingEnabled(preferenceKey, false);
+            setDialogReturnValue(preferenceKey, ret);
+        }
         return ret == trueOption;
     }
 
@@ -183,11 +207,11 @@
         }
 
         public boolean getDialogShowingEnabled() {
-            return cbShowDialog.isSelected();
+            return !cbShowDialog.isSelected();
         }
 
         public void remeberDialogShowingEnabled() {
-            ConditionalOptionPaneUtil.setDialogShowingEnabled(preferenceKey, !getDialogShowingEnabled());
+            ConditionalOptionPaneUtil.setDialogShowingEnabled(preferenceKey, getDialogShowingEnabled());
         }
     }
 }
