From: tcofoegbu Date: Tue, 31 May 2016 16:52:29 +0000 (+0100) Subject: JAL-1944 fix for visible seqs sometimes been replaced with hidden ones while exportin... X-Git-Tag: Release_2_10_0~198 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=3f06233fb50a383439b4e0f28405b8681c2e2d72;p=jalview.git JAL-1944 fix for visible seqs sometimes been replaced with hidden ones while exporting sequences with the option 'Export Hidden Sequences' set to false --- diff --git a/src/jalview/api/AlignViewportI.java b/src/jalview/api/AlignViewportI.java index 45e77ba..f40b73b 100644 --- a/src/jalview/api/AlignViewportI.java +++ b/src/jalview/api/AlignViewportI.java @@ -376,5 +376,20 @@ public interface AlignViewportI extends ViewStyleI */ void setFollowHighlight(boolean b); + /** + * Set whether hidden Sequences should be trimmed off during an export + * operation. + * + * @param isExportHiddenSeqs + */ + public void setExportHiddenSeqs(boolean isExportHiddenSeqs); + + /** + * If true hidden Sequences are exported otherwise they aren't + * + * @return + */ + public boolean isExportHiddenSeqs(); + public void applyFeaturesStyle(FeatureSettingsModelI featureSettings); } diff --git a/src/jalview/gui/AlignFrame.java b/src/jalview/gui/AlignFrame.java index d9d5f27..895f2f6 100644 --- a/src/jalview/gui/AlignFrame.java +++ b/src/jalview/gui/AlignFrame.java @@ -1313,6 +1313,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, if (viewport.hasHiddenColumns() && !settings.isExportHiddenColumns()) { + viewport.setExportHiddenSeqs(settings.isExportHiddenSequences()); omitHidden = viewport.getViewAsString(false); } diff --git a/src/jalview/viewmodel/AlignmentViewport.java b/src/jalview/viewmodel/AlignmentViewport.java index c16fdce..6581bef 100644 --- a/src/jalview/viewmodel/AlignmentViewport.java +++ b/src/jalview/viewmodel/AlignmentViewport.java @@ -1601,7 +1601,7 @@ public abstract class AlignmentViewport implements AlignViewportI, } else { - if (hasHiddenRows()) + if (hasHiddenRows() && isExportHiddenSeqs) { iSize = alignment.getHiddenSequences().getFullAlignment() .getHeight(); @@ -2719,4 +2719,18 @@ public abstract class AlignmentViewport implements AlignViewportI, } } } + + private boolean isExportHiddenSeqs = true; + + @Override + public void setExportHiddenSeqs(boolean isExportHiddenSeqs) + { + this.isExportHiddenSeqs = isExportHiddenSeqs; + } + + @Override + public boolean isExportHiddenSeqs() + { + return isExportHiddenSeqs; + } }