From: amwaterhouse Date: Fri, 27 Apr 2007 16:19:57 +0000 (+0000) Subject: Prevent err when editing and overview drawing X-Git-Tag: Release_2_3~117 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=1f9990748644d3380bc045aad1f694c0252cc35f;p=jalview.git Prevent err when editing and overview drawing --- diff --git a/src/jalview/appletgui/AnnotationPanel.java b/src/jalview/appletgui/AnnotationPanel.java index fbc98be..101bddf 100755 --- a/src/jalview/appletgui/AnnotationPanel.java +++ b/src/jalview/appletgui/AnnotationPanel.java @@ -1078,6 +1078,7 @@ public class AnnotationPanel public void drawGraph(Graphics g, AlignmentAnnotation aa, int width, int y, int sRes, int eRes) { + eRes = Math.min(eRes, aa.annotations.length); g.setColor(Color.white); g.fillRect(0, 0, width, y); g.setColor(new Color(0, 0, 180));