From 919cef3e2b8c066ab9fe5cbfe7f76fa54601b788 Mon Sep 17 00:00:00 2001 From: gmungoc Date: Mon, 21 Aug 2017 15:53:18 +0100 Subject: [PATCH] JAL-2609 tweaks including fully erasing scale above --- src/jalview/gui/SeqCanvas.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/jalview/gui/SeqCanvas.java b/src/jalview/gui/SeqCanvas.java index 088a359..46f2d84 100755 --- a/src/jalview/gui/SeqCanvas.java +++ b/src/jalview/gui/SeqCanvas.java @@ -709,17 +709,17 @@ public class SeqCanvas extends JComponent implements ViewportListenerI drawVerticalScale(g, startColumn, endColumn, ypos, false); } - g.translate(labelWidthWest, 0); - /* * white fill region of scale above and hidden column markers * (to support incremental fast paint of image) */ g.setColor(Color.white); g.fillRect(0, ypos - wrappedSpaceAboveAlignment, viewportWidth - * charWidth, wrappedSpaceAboveAlignment); + * charWidth + labelWidthWest, wrappedSpaceAboveAlignment); g.setColor(Color.black); + g.translate(labelWidthWest, 0); + if (av.getScaleAboveWrapped()) { drawNorthScale(g, startColumn, endColumn, ypos); @@ -1456,7 +1456,7 @@ public class SeqCanvas extends JComponent implements ViewportListenerI if (lastWidthPartHeight) { - int widthsAbove = visibleWidths - 2; + int widthsAbove = Math.max(0, visibleWidths - 2); int ypos = wrappedRepeatHeightPx * widthsAbove + wrappedSpaceAboveAlignment; int endRes = ranges.getEndRes(); -- 1.7.10.2