From 376dbd7fc249003055af7e43df08883cf1ed282f Mon Sep 17 00:00:00 2001 From: gmungoc Date: Thu, 6 Jul 2017 15:03:24 +0100 Subject: [PATCH] JAL-2605 ensure correct scale width calculation --- src/jalview/appletgui/SeqCanvas.java | 3 +++ src/jalview/gui/SeqCanvas.java | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/jalview/appletgui/SeqCanvas.java b/src/jalview/appletgui/SeqCanvas.java index fa44e1e..0f10363 100755 --- a/src/jalview/appletgui/SeqCanvas.java +++ b/src/jalview/appletgui/SeqCanvas.java @@ -420,6 +420,9 @@ public class SeqCanvas extends Panel implements ViewportListenerI FontMetrics fm = getFontMetrics(av.getFont()); + LABEL_EAST = 0; + LABEL_WEST = 0; + if (av.getScaleRightWrapped()) { LABEL_EAST = fm.stringWidth(getMask()); diff --git a/src/jalview/gui/SeqCanvas.java b/src/jalview/gui/SeqCanvas.java index d4b8f77..fb41f86 100755 --- a/src/jalview/gui/SeqCanvas.java +++ b/src/jalview/gui/SeqCanvas.java @@ -495,6 +495,9 @@ public class SeqCanvas extends JComponent implements ViewportListenerI FontMetrics fm = getFontMetrics(av.getFont()); + LABEL_EAST = 0; + LABEL_WEST = 0; + if (av.getScaleRightWrapped()) { LABEL_EAST = fm.stringWidth(getMask()); -- 1.7.10.2