JAL-4177 disable add/new view when an import is started.
authorJames Procter <j.procter@dundee.ac.uk>
Mon, 1 May 2023 16:09:15 +0000 (17:09 +0100)
committerJames Procter <j.procter@dundee.ac.uk>
Mon, 1 May 2023 16:09:15 +0000 (17:09 +0100)
src/jalview/gui/StructureChooser.java

index 03f9269..4e5378e 100644 (file)
@@ -1070,11 +1070,13 @@ public class StructureChooser extends GStructureChooser
       {
         pdbFileString = MessageManager.getString("label.none");
         pdbFileTooltip = MessageManager.getString("label.nothing_selected");
+        setPdbOptionsEnabled(false);
       }
     }
     else
     {
       btn_pdbFromFile.setEnabled(false);
+      setPdbOptionsEnabled(false);
       // lbl_fromFileStatus.setIcon(errorImage);
       pdbFileString = MessageManager.getString("label.none");
       pdbFileTooltip = MessageManager.getString("label.nothing_selected");
@@ -1199,7 +1201,8 @@ public class StructureChooser extends GStructureChooser
     final StructureSelectionManager ssm = ap.getStructureSelectionManager();
 
     final int preferredHeight = pnl_filter.getHeight();
-
+    btn_add.setEnabled(false);
+    btn_newView.setEnabled(false);
     Runnable viewStruc = new Runnable()
     {
       @Override