From: Jim Procter Date: Wed, 21 Aug 2019 09:15:01 +0000 (+0100) Subject: JAL-3253 fix scrollTo termination check. X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=b3a111ba6d4c239f39d430997fc470ef9008748d;p=jalview.git JAL-3253 fix scrollTo termination check. --- diff --git a/src/jalview/viewmodel/ViewportRanges.java b/src/jalview/viewmodel/ViewportRanges.java index 9f54964..a022627 100644 --- a/src/jalview/viewmodel/ViewportRanges.java +++ b/src/jalview/viewmodel/ViewportRanges.java @@ -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) // {