JAL-4159 disable the score model combo box when pasimap is selected
authorJim Procter <jprocter@dundee.ac.uk>
Thu, 23 May 2024 17:17:12 +0000 (18:17 +0100)
committerJim Procter <jprocter@dundee.ac.uk>
Thu, 23 May 2024 17:17:12 +0000 (18:17 +0100)
src/jalview/gui/CalculationChooser.java

index 3b7ca81..3775c47 100644 (file)
@@ -576,6 +576,7 @@ public class CalculationChooser extends JPanel
     }
     // finally, update the model
     comboBox.setModel(model);
+    comboBox.setEnabled(model.getSize()>0);
     
   }
 
@@ -601,7 +602,7 @@ public class CalculationChooser extends JPanel
     ScoreModels scoreModels = ScoreModels.getInstance();
     for (ScoreModelI sm : scoreModels.getModels())
     {
-      if ((!nucleotide && sm.isProtein() || nucleotide && sm.isDNA() 
+      if (!forPasimap && (!nucleotide && sm.isProtein() || nucleotide && sm.isDNA() 
               || sm.isSecondaryStructure() && ssPresent))
               
       {