From: gmungoc Date: Fri, 20 Oct 2017 07:44:17 +0000 (+0100) Subject: JAL-2609 fully erase scale above, tidy code change X-Git-Tag: Release_2_10_3b1~91^2 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=465a6cd845df09406c71ffbe760d0df4dbeb803d;p=jalview.git JAL-2609 fully erase scale above, tidy code change --- diff --git a/src/jalview/gui/SeqCanvas.java b/src/jalview/gui/SeqCanvas.java index 6c6e87a..d82f69a 100755 --- a/src/jalview/gui/SeqCanvas.java +++ b/src/jalview/gui/SeqCanvas.java @@ -838,10 +838,12 @@ public class SeqCanvas extends JComponent implements ViewportListenerI * white fill region of scale above and hidden column markers * (to support incremental fast paint of image) */ + g.translate(labelWidthWest, 0); g.setColor(Color.white); g.fillRect(0, ypos - wrappedSpaceAboveAlignment, viewportWidth * charWidth + labelWidthWest, wrappedSpaceAboveAlignment); g.setColor(Color.black); + g.translate(-labelWidthWest, 0); g.translate(labelWidthWest, 0); @@ -1666,7 +1668,7 @@ public class SeqCanvas extends JComponent implements ViewportListenerI // larger than the visible window ViewportRanges vpRanges = av.getRanges(); scrollX = (int) evt.getNewValue() - (int) evt.getOldValue(); - int range = vpRanges.getEndRes() - vpRanges.getStartRes() + 1; + int range = vpRanges.getViewportWidth(); if (scrollX > range) { scrollX = range;