From 7c19c72efd3433b14f845c265747010d9dc596cc Mon Sep 17 00:00:00 2001 From: kiramt Date: Tue, 7 Mar 2017 14:27:05 +0000 Subject: [PATCH] JAL-2388 Missed commit --- src/jalview/datamodel/Alignment.java | 2 +- src/jalview/datamodel/HiddenSequences.java | 12 ++++++++++++ src/jalview/gui/AlignViewport.java | 8 +------- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/src/jalview/datamodel/Alignment.java b/src/jalview/datamodel/Alignment.java index 2546d41..33f30cf 100755 --- a/src/jalview/datamodel/Alignment.java +++ b/src/jalview/datamodel/Alignment.java @@ -784,7 +784,7 @@ public class Alignment implements AlignmentI @Override public boolean isHidden(int alignmentIndex) { - return (getHiddenSequences().getHiddenSequence(alignmentIndex) == null); + return (getHiddenSequences().getHiddenSequence(alignmentIndex) != null); } /** diff --git a/src/jalview/datamodel/HiddenSequences.java b/src/jalview/datamodel/HiddenSequences.java index 9e2cf72..588e5ed 100755 --- a/src/jalview/datamodel/HiddenSequences.java +++ b/src/jalview/datamodel/HiddenSequences.java @@ -246,6 +246,12 @@ public class HiddenSequences return hiddenSequences == null ? null : hiddenSequences[alignmentIndex]; } + /** + * Convert absolute alignment index to visible alignment index + * + * @param alignmentIndex + * @return + */ public int findIndexWithoutHiddenSeqs(int alignmentIndex) { if (hiddenSequences == null) @@ -271,6 +277,12 @@ public class HiddenSequences return (alignmentIndex - hiddenSeqs); } + /** + * Convert alignment index from visible alignment to absolute alignment + * + * @param alignmentIndex + * @return + */ public int adjustForHiddenSeqs(int alignmentIndex) { if (hiddenSequences == null) diff --git a/src/jalview/gui/AlignViewport.java b/src/jalview/gui/AlignViewport.java index b64d98e..598bd69 100644 --- a/src/jalview/gui/AlignViewport.java +++ b/src/jalview/gui/AlignViewport.java @@ -238,11 +238,7 @@ public class AlignViewport extends AlignmentViewport implements void init() { - - /*setStartRes(0); - setEndRes(alignment.getWidth() - 1); - setStartSeq(0); - setEndSeq(alignment.getHeight() - 1);*/ + posProps = new ViewportPositionProps(this.alignment); applyViewProperties(); String fontName = Cache.getDefault("FONT_NAME", "SansSerif"); @@ -309,8 +305,6 @@ public class AlignViewport extends AlignmentViewport implements { residueShading.setConsensus(hconsensus); } - - posProps = new ViewportPositionProps(this.alignment); } /** -- 1.7.10.2