JAL-629 Guesstimate whether to set pLDDT with PDB file
[jalview.git] / src / jalview / jbgui / GStructureChooser.java
index ac623bc..d317e97 100644 (file)
@@ -133,6 +133,8 @@ public abstract class GStructureChooser extends JPanel
 
   protected JComboBox<StructureImportSettings.TFType> combo_tempFacAs = new JComboBox<>();
 
+  protected boolean tempFacAsChanged = false;
+
   protected JButton btn_paeMatrixFile = new JButton();
 
   protected JLabel lbl_paeFile = new JLabel();
@@ -577,6 +579,15 @@ public abstract class GStructureChooser extends JPanel
     {
       combo_tempFacAs.addItem(t);
     }
+    combo_tempFacAs.addItemListener(new ItemListener()
+    {
+      @Override
+      public void itemStateChanged(ItemEvent e)
+      {
+        // used to determine if we should guess pLDDT or leave a user-choice
+        tempFacAsChanged = true;
+      }
+    });
 
     btn_paeMatrixFile.setFont(VERDANA_12);
     btn_paeMatrixFile.setText(new StringBuilder()