JAL-147 update ViewportRanges height after show/hide sequences
authorgmungoc <g.m.carstairs@dundee.ac.uk>
Tue, 4 Jul 2017 10:05:15 +0000 (11:05 +0100)
committergmungoc <g.m.carstairs@dundee.ac.uk>
Tue, 4 Jul 2017 10:05:15 +0000 (11:05 +0100)
src/jalview/viewmodel/AlignmentViewport.java

index 1e094fd..7b64ab3 100644 (file)
@@ -1408,6 +1408,7 @@ public abstract class AlignmentViewport implements AlignViewportI,
 
       hiddenRepSequences = null;
 
+      ranges.setViewportStartAndHeight(0, alignment.getHeight());
       firePropertyChange("alignment", null, alignment.getSequences());
       // used to set hasHiddenRows/hiddenRepSequences here, after the property
       // changed event
@@ -1432,6 +1433,7 @@ public abstract class AlignmentViewport implements AlignViewportI,
         selectionGroup.addSequence(seq, false);
         setSequenceAnnotationsVisible(seq, true);
       }
+      ranges.setViewportStartAndHeight(0, alignment.getHeight());
       firePropertyChange("alignment", null, alignment.getSequences());
       sendSelection();
     }
@@ -1460,6 +1462,7 @@ public abstract class AlignmentViewport implements AlignViewportI,
         alignment.getHiddenSequences().hideSequence(seq[i]);
         setSequenceAnnotationsVisible(seq[i], false);
       }
+      ranges.setViewportStartAndHeight(0, alignment.getHeight());
       firePropertyChange("alignment", null, alignment.getSequences());
     }
   }