From: gmungoc Date: Mon, 3 Jul 2017 14:17:27 +0000 (+0100) Subject: JAL-147 don't draw ScalePanel when in wrapped mode X-Git-Tag: Release_2_10_3b1~132^2~61 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=eceeb384e2117b35c85a0abdf69a6ddaafd66b6e;p=jalview.git JAL-147 don't draw ScalePanel when in wrapped mode --- diff --git a/src/jalview/appletgui/ScalePanel.java b/src/jalview/appletgui/ScalePanel.java index 1737c01..f580d85 100755 --- a/src/jalview/appletgui/ScalePanel.java +++ b/src/jalview/appletgui/ScalePanel.java @@ -350,9 +350,15 @@ public class ScalePanel extends Panel implements MouseMotionListener, @Override public void paint(Graphics g) { - drawScale(g, av.getRanges().getStartRes(), av.getRanges().getEndRes(), - getSize().width, - getSize().height); + /* + * shouldn't get called in wrapped mode as the scale above is + * drawn instead by SeqCanvas.drawNorthScale + */ + if (!av.getWrapAlignment()) + { + drawScale(g, av.getRanges().getStartRes(), + av.getRanges().getEndRes(), getSize().width, getSize().height); + } } // scalewidth will normally be screenwidth, diff --git a/src/jalview/gui/ScalePanel.java b/src/jalview/gui/ScalePanel.java index e5f2be8..ec03681 100755 --- a/src/jalview/gui/ScalePanel.java +++ b/src/jalview/gui/ScalePanel.java @@ -422,8 +422,15 @@ public class ScalePanel extends JPanel implements MouseMotionListener, @Override public void paintComponent(Graphics g) { - drawScale(g, av.getRanges().getStartRes(), av.getRanges().getEndRes(), - getWidth(), getHeight()); + /* + * shouldn't get called in wrapped mode as the scale above is + * drawn instead by SeqCanvas.drawNorthScale + */ + if (!av.getWrapAlignment()) + { + drawScale(g, av.getRanges().getStartRes(), + av.getRanges().getEndRes(), getWidth(), getHeight()); + } } // scalewidth will normally be screenwidth,