JAL-2388 Missed commit
authorkiramt <k.mourao@dundee.ac.uk>
Tue, 7 Mar 2017 14:27:05 +0000 (14:27 +0000)
committerkiramt <k.mourao@dundee.ac.uk>
Tue, 7 Mar 2017 14:27:05 +0000 (14:27 +0000)
src/jalview/datamodel/Alignment.java
src/jalview/datamodel/HiddenSequences.java
src/jalview/gui/AlignViewport.java

index 2546d41..33f30cf 100755 (executable)
@@ -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);
   }
 
   /**
index 9e2cf72..588e5ed 100755 (executable)
@@ -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)
index b64d98e..598bd69 100644 (file)
@@ -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);
   }
 
   /**