clear the last area in fast paint
authoramwaterhouse <Andrew Waterhouse>
Fri, 8 Apr 2005 15:04:23 +0000 (15:04 +0000)
committeramwaterhouse <Andrew Waterhouse>
Fri, 8 Apr 2005 15:04:23 +0000 (15:04 +0000)
src/jalview/gui/AnnotationPanel.java

index 76559bd..69af559 100755 (executable)
@@ -350,7 +350,10 @@ public class AnnotationPanel extends JPanel implements MouseListener, MouseMotio
 \r
   public void fastPaint(int horizontal)\r
 {\r
-  if(image==null || horizontal ==0)\r
+  if(      horizontal ==0\r
+     || av.alignment.getAlignmentAnnotation()==null\r
+     || av.alignment.getAlignmentAnnotation().length<1\r
+    )\r
   {\r
     repaint();\r
     return;\r
@@ -387,6 +390,8 @@ public class AnnotationPanel extends JPanel implements MouseListener, MouseMotio
     g.fillRect(0,0,(endRes-startRes) *av.charWidth, getHeight());\r
     if(av.alignment.getAlignmentAnnotation()==null || av.alignment.getAlignmentAnnotation().length<1)\r
     {\r
+      g.setColor(Color.white);\r
+      g.fillRect(0,0,getWidth(), getHeight());\r
       g.setColor(Color.black);\r
       g.drawString("Alignment has no annotations",20,15);\r
       return;\r