JAL-147 don't draw ScalePanel when in wrapped mode
[jalview.git] / src / jalview / gui / ScalePanel.java
index e5f2be8..ec03681 100755 (executable)
@@ -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,