From bde7de1e5fe8d7bb1a119b6193297755feaef52a Mon Sep 17 00:00:00 2001 From: gmungoc Date: Fri, 24 Mar 2017 16:28:29 +0000 Subject: [PATCH] JAL-2428 use 'correct' name for selected score model --- src/jalview/appletgui/AlignFrame.java | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/jalview/appletgui/AlignFrame.java b/src/jalview/appletgui/AlignFrame.java index 02498aa..11df2c7 100644 --- a/src/jalview/appletgui/AlignFrame.java +++ b/src/jalview/appletgui/AlignFrame.java @@ -23,6 +23,8 @@ package jalview.appletgui; import jalview.analysis.AlignmentSorter; import jalview.analysis.AnnotationSorter.SequenceAnnotationOrder; import jalview.analysis.TreeBuilder; +import jalview.analysis.scoremodels.PIDModel; +import jalview.analysis.scoremodels.ScoreModels; import jalview.api.AlignViewControllerGuiI; import jalview.api.AlignViewControllerI; import jalview.api.AlignViewportI; @@ -2814,29 +2816,31 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener, public void averageDistanceTreeMenuItem_actionPerformed() { - NewTreePanel(TreeBuilder.AVERAGE_DISTANCE, "PID", + newTreePanel(TreeBuilder.AVERAGE_DISTANCE, new PIDModel().getName(), "Average distance tree using PID"); } public void neighbourTreeMenuItem_actionPerformed() { - NewTreePanel(TreeBuilder.NEIGHBOUR_JOINING, "PID", + newTreePanel(TreeBuilder.NEIGHBOUR_JOINING, new PIDModel().getName(), "Neighbour joining tree using PID"); } protected void njTreeBlosumMenuItem_actionPerformed() { - NewTreePanel(TreeBuilder.NEIGHBOUR_JOINING, "BL", + newTreePanel(TreeBuilder.NEIGHBOUR_JOINING, ScoreModels.getInstance() + .getBlosum62().getName(), "Neighbour joining tree using BLOSUM62"); } protected void avTreeBlosumMenuItem_actionPerformed() { - NewTreePanel(TreeBuilder.AVERAGE_DISTANCE, "BL", + newTreePanel(TreeBuilder.AVERAGE_DISTANCE, ScoreModels.getInstance() + .getBlosum62().getName(), "Average distance tree using BLOSUM62"); } - void NewTreePanel(String type, String pwType, String title) + void newTreePanel(String type, String pwType, String title) { // are the sequences aligned? if (!viewport.getAlignment().isAligned(false)) -- 1.7.10.2