From 862ac4a204be310d5b61d72a14e71c6eacb629e1 Mon Sep 17 00:00:00 2001 From: kiramt Date: Mon, 8 May 2017 10:47:16 +0100 Subject: [PATCH] JAL-2491 Tweaks to avoid scroll problems at bottom of wrapped alignment --- src/jalview/viewmodel/ViewportRanges.java | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/jalview/viewmodel/ViewportRanges.java b/src/jalview/viewmodel/ViewportRanges.java index 72155aa..7a526c7 100644 --- a/src/jalview/viewmodel/ViewportRanges.java +++ b/src/jalview/viewmodel/ViewportRanges.java @@ -103,11 +103,7 @@ public class ViewportRanges extends ViewportProperties } this.startRes = startres; - if (endres >= al.getWidth()) - { - endres = al.getWidth() - 1; - } - else if (endres < 0) + if (endres < 0) { endres = 0; } @@ -287,11 +283,7 @@ public class ViewportRanges extends ViewportProperties public void scrollToWrappedVisible(int res) { - if (res < startRes || res > endRes) - { - setEndSeq(res / getViewportWidth()); - } - + setStartRes(res); } } -- 1.7.10.2