JAL-1847 superpose checkbox in structure chooser
[jalview.git] / src / jalview / gui / ScalePanel.java
index c8040de..e6bba02 100755 (executable)
@@ -410,6 +410,8 @@ public class ScalePanel extends JPanel
   @Override
   public void paintComponent(Graphics g)
   {
+    super.paintComponent(g);
+
     /*
      * shouldn't get called in wrapped mode as the scale above is
      * drawn instead by SeqCanvas.drawNorthScale
@@ -488,7 +490,7 @@ public class ScalePanel extends JPanel
 
       if (av.getShowHiddenMarkers())
       {
-        Iterator<Integer> it = hidden.getBoundedStartIterator(startx,
+        Iterator<Integer> it = hidden.getStartRegionIterator(startx,
                 startx + widthx + 1);
         while (it.hasNext())
         {
@@ -550,7 +552,11 @@ public class ScalePanel extends JPanel
             || evt.getPropertyName().equals(ViewportRanges.MOVE_VIEWPORT))
     {
       // scroll event, repaint panel
-      repaint();
+       
+       // Call repaint on alignment panel so that repaints from other alignment
+    // panel components can be aggregated. Otherwise performance of the overview
+    // window and others may be adversely affected.
+      av.getAlignPanel().repaint();
     }
   }