From 03beb4f2f8719088cc8c92a7ebc1ad9f2c257426 Mon Sep 17 00:00:00 2001 From: kiramt Date: Mon, 8 May 2017 16:36:07 +0100 Subject: [PATCH] JAL-2491 More wrap corrections --- src/jalview/viewmodel/ViewportRanges.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/jalview/viewmodel/ViewportRanges.java b/src/jalview/viewmodel/ViewportRanges.java index 7a526c7..54bbfd8 100644 --- a/src/jalview/viewmodel/ViewportRanges.java +++ b/src/jalview/viewmodel/ViewportRanges.java @@ -283,7 +283,9 @@ public class ViewportRanges extends ViewportProperties public void scrollToWrappedVisible(int res) { - setStartRes(res); + // get the start residue of the wrapped row which res is in + // and set that as our start residue + setStartRes((res / getViewportWidth()) * getViewportWidth()); } } -- 1.7.10.2