Prevent err when editing and overview drawing
authoramwaterhouse <Andrew Waterhouse>
Fri, 27 Apr 2007 16:19:57 +0000 (16:19 +0000)
committeramwaterhouse <Andrew Waterhouse>
Fri, 27 Apr 2007 16:19:57 +0000 (16:19 +0000)
src/jalview/appletgui/AnnotationPanel.java

index fbc98be..101bddf 100755 (executable)
@@ -1078,6 +1078,7 @@ public class AnnotationPanel
   public void drawGraph(Graphics g, AlignmentAnnotation aa, int width, int y,\r
                         int sRes, int eRes)\r
   {\r
+    eRes = Math.min(eRes, aa.annotations.length);\r
     g.setColor(Color.white);\r
     g.fillRect(0, 0, width, y);\r
     g.setColor(new Color(0, 0, 180));\r