JAL-1944 bugfix for error when exporting hidden sequences but not hidden columns
authortcofoegbu <tcnofoegbu@dundee.ac.uk>
Mon, 22 Feb 2016 15:38:01 +0000 (15:38 +0000)
committertcofoegbu <tcnofoegbu@dundee.ac.uk>
Mon, 22 Feb 2016 15:38:01 +0000 (15:38 +0000)
src/jalview/viewmodel/AlignmentViewport.java

index c4ae76d..7bbe677 100644 (file)
@@ -1557,9 +1557,20 @@ public abstract class AlignmentViewport implements AlignViewportI,
     }
     else
     {
-      iSize = alignment.getHeight();
-      seqs = alignment.getSequencesArray();
-      end = alignment.getWidth();
+      if (alignment.getHiddenSequences() != null)
+      {
+        iSize = alignment.getHiddenSequences().getFullAlignment()
+                .getHeight();
+        seqs = alignment.getHiddenSequences().getFullAlignment()
+                .getSequencesArray();
+        end = alignment.getHiddenSequences().getFullAlignment().getWidth();
+      }
+      else
+      {
+        iSize = alignment.getHeight();
+        seqs = alignment.getSequencesArray();
+        end = alignment.getWidth();
+      }
     }
 
     selection = new String[iSize];