From: Jim Procter Date: Thu, 4 Jul 2024 16:40:00 +0000 (+0100) Subject: Merge branch 'develop' into spike/JAL-4386_develop_trial_merge X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=7e61eb8556cc0074d8ae65633db74d60d715b6d3;p=jalview.git Merge branch 'develop' into spike/JAL-4386_develop_trial_merge Conflicts: src/jalview/gui/AlignFrame.java src/jalview/gui/CalculationChooser.java --- 7e61eb8556cc0074d8ae65633db74d60d715b6d3 diff --cc src/jalview/gui/AlignFrame.java index 93d6424,8336626..050624e --- a/src/jalview/gui/AlignFrame.java +++ b/src/jalview/gui/AlignFrame.java @@@ -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; diff --cc src/jalview/gui/CalculationChooser.java index 8c8bf21,f8986b6..4b89711 --- a/src/jalview/gui/CalculationChooser.java +++ b/src/jalview/gui/CalculationChooser.java @@@ -593,37 -669,41 +674,39 @@@ public class CalculationChooser extend return filtered; } - protected List getApplicableSecondaryStructureSources() { - AlignmentAnnotation[] annotations = af.getViewport().getAlignment() - .getAlignmentAnnotation(); - - List ssSources = AlignmentUtils - .getSecondaryStructureSources(annotations); - // List ssSources = - // AlignmentUtils.extractSSSourceInAlignmentAnnotation(annotations); - + AlignmentAnnotation[] annotations = af.getViewport().getAlignment().getAlignmentAnnotation(); + + //List ssSources = AlignmentUtils.getSecondaryStructureSources(annotations); + List 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); diff --cc src/jalview/gui/PCAPanel.java index 0bcb0da,091f79e..1bf1e76 --- a/src/jalview/gui/PCAPanel.java +++ b/src/jalview/gui/PCAPanel.java @@@ -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;