Dont draw all the panel if just a mouse movement
[jalview.git] / src / jalview / appletgui / SeqCanvas.java
index 0df4322..980be96 100755 (executable)
@@ -243,6 +243,15 @@ public class SeqCanvas
   public void paint(Graphics g)\r
   {\r
 \r
+    if (img != null && (fastPaint\r
+                        || (getSize().width != g.getClipBounds().width)\r
+                        || (getSize().height != g.getClipBounds().height)))\r
+    {\r
+      g.drawImage(img, 0, 0, this);\r
+      fastPaint = false;\r
+      return;\r
+    }\r
+\r
     if (fastPaint)\r
     {\r
       g.drawImage(img, 0, 0, this);\r
@@ -433,7 +442,6 @@ public class SeqCanvas
 \r
   void drawPanel(Graphics g, int startRes, int endRes, int startSeq, int endSeq, int offset)\r
   {\r
-\r
     g.setFont(av.getFont());\r
     sr.renderGaps(av.renderGaps);\r
 \r