JAL-3032 JvOptionPane summary of issues with boilerplate modal dialogs.
[jalview.git] / src / jalview / gui / UserDefinedColours.java
index 3290500..df0f189 100755 (executable)
@@ -480,7 +480,9 @@ public class UserDefinedColours extends GUserDefinedColours
    */
   protected void warnIfUnsavedChanges()
   {
-    if (!changed)
+    // BH 2018 no warning in JavaScript TODO
+    
+    if (/** @j2sNative true || */ !changed)
     {
       return;
     }
@@ -743,7 +745,8 @@ public class UserDefinedColours extends GUserDefinedColours
 
     if (ColourSchemes.getInstance().nameExists(name))
     {
-      int reply = JvOptionPane.showInternalConfirmDialog(Desktop.desktop,
+      // BH 2018 SwingJS bypasses this question with YES_OPTION
+      int reply = /** @j2sNative  0 &&  */ JvOptionPane.showInternalConfirmDialog(Desktop.desktop,
               MessageManager.formatMessage(
                       "label.colour_scheme_exists_overwrite", new Object[]
                       { name, name }),