JAL-1031 JAL-1032 if selection is non-null but empty, then calculate PCA or tree...
[jalview.git] / src / jalview / appletgui / TreePanel.java
index aa57908..ec2512f 100644 (file)
@@ -199,9 +199,11 @@ public class TreePanel extends EmbmenuFrame implements ActionListener,
       {
         int start, end;
         SequenceI[] seqs;
-        AlignmentView seqStrings = av.getAlignmentView(av
-                .getSelectionGroup() != null);
-        if (av.getSelectionGroup() == null)
+        boolean selview=(av
+                .getSelectionGroup() != null) && (av
+                .getSelectionGroup().getSize()>1);
+        AlignmentView seqStrings = av.getAlignmentView(selview);
+        if (!selview)
         {
           start = 0;
           end = av.getAlignment().getWidth();