From cb98f8af1387172026ae298ead3ffb29aa04510c Mon Sep 17 00:00:00 2001 From: tcofoegbu Date: Mon, 22 Feb 2016 15:38:01 +0000 Subject: [PATCH] JAL-1944 bugfix for error when exporting hidden sequences but not hidden columns --- src/jalview/viewmodel/AlignmentViewport.java | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/src/jalview/viewmodel/AlignmentViewport.java b/src/jalview/viewmodel/AlignmentViewport.java index c4ae76d..7bbe677 100644 --- a/src/jalview/viewmodel/AlignmentViewport.java +++ b/src/jalview/viewmodel/AlignmentViewport.java @@ -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]; -- 1.7.10.2