From b3a111ba6d4c239f39d430997fc470ef9008748d Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Wed, 21 Aug 2019 10:15:01 +0100 Subject: [PATCH] JAL-3253 fix scrollTo termination check. --- src/jalview/viewmodel/ViewportRanges.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) // { -- 1.7.10.2