JAL-2778 Changed local repaint to alignment repaint for fastpaints
[jalview.git] / src / jalview / gui / IdCanvas.java
index ae13444..1ee281a 100755 (executable)
@@ -204,7 +204,8 @@ public class IdCanvas extends JPanel implements ViewportListenerI
     gg.translate(0, -transY);
 
     fastPaint = true;
-    repaint();
+
+    av.getAlignPanel().alignFrame.repaint();
   }
 
   /**
@@ -220,39 +221,39 @@ public class IdCanvas extends JPanel implements ViewportListenerI
 
     g.setColor(Color.white);
     g.fillRect(0, 0, getWidth(), getHeight());
-
+    
     if (fastPaint)
     {
       fastPaint = false;
       g.drawImage(image, 0, 0, this);
-
+    
       return;
     }
-
+    
     int oldHeight = imgHeight;
-
+    
     imgHeight = getHeight();
     imgHeight -= (imgHeight % av.getCharHeight());
-
+    
     if (imgHeight < 1)
     {
       return;
     }
-
+    
     if (oldHeight != imgHeight || image.getWidth(this) != getWidth())
     {
       image = new BufferedImage(getWidth(), imgHeight,
               BufferedImage.TYPE_INT_RGB);
     }
-
+    
     gg = (Graphics2D) image.getGraphics();
-
+    
     // Fill in the background
     gg.setColor(Color.white);
     gg.fillRect(0, 0, getWidth(), imgHeight);
-
+    
     drawIds(av.getRanges().getStartSeq(), av.getRanges().getEndSeq());
-
+    
     g.drawImage(image, 0, 0, this);
   }