JAL-2428 use 'correct' name for selected score model
authorgmungoc <g.m.carstairs@dundee.ac.uk>
Fri, 24 Mar 2017 16:28:29 +0000 (16:28 +0000)
committergmungoc <g.m.carstairs@dundee.ac.uk>
Fri, 24 Mar 2017 16:28:29 +0000 (16:28 +0000)
src/jalview/appletgui/AlignFrame.java

index 02498aa..11df2c7 100644 (file)
@@ -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))