JAL-2491 More wrap corrections
authorkiramt <k.mourao@dundee.ac.uk>
Mon, 8 May 2017 15:36:07 +0000 (16:36 +0100)
committerkiramt <k.mourao@dundee.ac.uk>
Mon, 8 May 2017 15:36:07 +0000 (16:36 +0100)
src/jalview/viewmodel/ViewportRanges.java

index 7a526c7..54bbfd8 100644 (file)
@@ -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());
   }
 
 }