From: gmungoc Date: Fri, 30 Jun 2017 04:38:32 +0000 (+0100) Subject: Merge branch 'develop' into features/JAL-2446NCList X-Git-Tag: Release_2_10_3b1~183 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=d253d66e8bf5bb3567194bc709c068fc2aed278d;p=jalview.git Merge branch 'develop' into features/JAL-2446NCList --- d253d66e8bf5bb3567194bc709c068fc2aed278d diff --cc src/jalview/gui/SeqCanvas.java index c05c172,f392810..e2401d2 --- a/src/jalview/gui/SeqCanvas.java +++ b/src/jalview/gui/SeqCanvas.java @@@ -288,21 -286,22 +288,22 @@@ public class SeqCanvas extends JCompone fastpainting = true; fastPaint = true; updateViewport(); - gg.copyArea(horizontal * charWidth, vertical * charHeight, imgWidth, - imgHeight, -horizontal * charWidth, -vertical * charHeight); ViewportRanges ranges = av.getRanges(); - int sr = ranges.getStartRes(); - int er = ranges.getEndRes(); - int ss = ranges.getStartSeq(); - int es = ranges.getEndSeq(); + int startRes = ranges.getStartRes(); + int endRes = ranges.getEndRes(); + int startSeq = ranges.getStartSeq(); + int endSeq = ranges.getEndSeq(); int transX = 0; int transY = 0; + gg.copyArea(horizontal * charWidth, vertical * charHeight, imgWidth, + imgHeight, -horizontal * charWidth, -vertical * charHeight); + if (horizontal > 0) // scrollbar pulled right, image to the left { - transX = (er - sr - horizontal) * charWidth; - sr = er - horizontal; + transX = (endRes - startRes - horizontal) * charWidth; + startRes = endRes - horizontal; } else if (horizontal < 0) {