JAL-3253 fix scrollTo termination check.
authorJim Procter <jprocter@issues.jalview.org>
Wed, 21 Aug 2019 09:15:01 +0000 (10:15 +0100)
committerJim Procter <jprocter@issues.jalview.org>
Wed, 21 Aug 2019 09:15:01 +0000 (10:15 +0100)
src/jalview/viewmodel/ViewportRanges.java

index 9f54964..a022627 100644 (file)
@@ -224,7 +224,7 @@ public class ViewportRanges extends ViewportProperties
   public void setStartSeq(int seq)
   {
     int height = getViewportHeight();
-    int startseq = Math.max(seq, getVisibleAlignmentHeight() - height);
+    int startseq = Math.min(seq, getVisibleAlignmentHeight() - height);
     // BH 2019.07.27 cosmetic only -- was:
     // if (startseq + height - 1 > getVisibleAlignmentHeight() - 1)
     // {