Merge branch 'develop' into spike/JAL-4386_develop_trial_merge
authorJim Procter <jprocter@dundee.ac.uk>
Thu, 4 Jul 2024 16:40:00 +0000 (17:40 +0100)
committerJim Procter <jprocter@dundee.ac.uk>
Thu, 4 Jul 2024 16:40:00 +0000 (17:40 +0100)
 Conflicts:
src/jalview/gui/AlignFrame.java
src/jalview/gui/CalculationChooser.java

1  2 
resources/lang/Messages.properties
src/jalview/gui/AlignFrame.java
src/jalview/gui/CalculationChooser.java
src/jalview/gui/PCAPanel.java
src/jalview/project/Jalview2XML.java
src/jalview/viewmodel/AlignmentViewport.java

Simple merge
@@@ -73,6 -72,8 +73,7 @@@ import javax.swing.JLayeredPane
  import javax.swing.JMenu;
  import javax.swing.JMenuItem;
  import javax.swing.JPanel;
+ import javax.swing.JProgressBar;
 -import javax.swing.JRadioButtonMenuItem;
  import javax.swing.JScrollPane;
  import javax.swing.SwingUtilities;
  
@@@ -593,37 -669,41 +674,39 @@@ public class CalculationChooser extend
      return filtered;
    }
  
-   
    protected List<String> getApplicableSecondaryStructureSources()
    {
 -    AlignmentAnnotation[] annotations = af.getViewport().getAlignment()
 -            .getAlignmentAnnotation();
 -
 -    List<String> ssSources = AlignmentUtils
 -            .getSecondaryStructureSources(annotations);
 -    // List<String> ssSources =
 -    // AlignmentUtils.extractSSSourceInAlignmentAnnotation(annotations);
 -
 +    AlignmentAnnotation[] annotations = af.getViewport().getAlignment().getAlignmentAnnotation();
 +    
 +    //List<String> ssSources = AlignmentUtils.getSecondaryStructureSources(annotations);
 +    List<String> ssSources = AlignmentUtils.extractSSSourceInAlignmentAnnotation(annotations);
 +    
-                  
      return ssSources;
    }
-   
    /**
     * Open and calculate the selected tree or PCA on 'OK'
     */
    protected void calculate_actionPerformed()
    {
      boolean doPCA = pca.isSelected();
-     String modelName = modelNames.getSelectedItem().toString();
++
+     boolean doPaSiMap = pasimap.isSelected();
+     boolean doPairwise = pairwise.isSelected();
+     String modelName = modelNames.getSelectedItem() == null ? ""
+             : modelNames.getSelectedItem().toString();
 -    String ssSource = "";
 -    Object selectedItem = ssSourceDropdown.getSelectedItem();
 -    if (selectedItem != null)
 -    {
 -      ssSource = selectedItem.toString();
 +
 +    String ssSource = null;
 +    
 +    if (modelName.equals(secondaryStructureModelName)) {
 +      Object selectedItem = ssSourceDropdown.getSelectedItem();
 +      if (selectedItem != null) {
 +          ssSource = selectedItem.toString();
 +      }
      }
      SimilarityParams params = getSimilarityParameters(doPCA);
 -    if (ssSource.length() > 0)
 -    {
 -      params.setSecondaryStructureSource(ssSource);
 -    }
 -
 +    params.setSecondaryStructureSource(ssSource);
 +    
      if (doPCA)
      {
        openPcaPanel(modelName, params);
@@@ -32,10 -32,9 +32,11 @@@ import java.awt.print.PrinterException
  import java.awt.print.PrinterJob;
  
  import javax.swing.ButtonGroup;
 +import javax.swing.JLabel;
  import javax.swing.JMenuItem;
+ import javax.swing.JProgressBar;
  import javax.swing.JRadioButtonMenuItem;
 +import javax.swing.SwingConstants;
  import javax.swing.event.InternalFrameAdapter;
  import javax.swing.event.InternalFrameEvent;
  
Simple merge