JAL-2428 simplify TreeModel constructors, add getOriginalData
[jalview.git] / src / jalview / appletgui / TreePanel.java
index a9e11a7..905a54a 100644 (file)
@@ -164,7 +164,7 @@ public class TreePanel extends EmbmenuFrame implements ActionListener,
     // yields unaligned seqs)
     // or create a selection box around columns in alignment view
     // test Alignment(SeqCigar[])
-    if (tree.seqData != null)
+    if (tree.getOriginalData() != null)
     {
       char gc = '-';
       try
@@ -175,8 +175,8 @@ public class TreePanel extends EmbmenuFrame implements ActionListener,
       } catch (Exception ex)
       {
       }
-      ;
-      Object[] alAndColsel = tree.seqData
+
+      Object[] alAndColsel = tree.getOriginalData()
               .getAlignmentAndColumnSelection(gc);
 
       if (alAndColsel != null && alAndColsel[0] != null)
@@ -210,17 +210,8 @@ public class TreePanel extends EmbmenuFrame implements ActionListener,
     {
       if (newtree != null)
       {
-        if (odata == null)
-        {
-          tree = new TreeModel(av.getAlignment().getSequencesArray(),
-                  newtree);
-        }
-        else
-        {
-          tree = new TreeModel(av.getAlignment().getSequencesArray(),
-                  odata, newtree);
-        }
-
+        tree = new TreeModel(av.getAlignment().getSequencesArray(), odata,
+                newtree);
       }
       else
       {