From: amwaterhouse Date: Mon, 30 Jan 2006 17:14:22 +0000 (+0000) Subject: Dont draw origin beyond end of alignment X-Git-Tag: Root_VamJalview_2_07b+~193 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=d0600c8c45d1ba2c77c442113b2e2a6a5dc960e6;p=jalview.git Dont draw origin beyond end of alignment --- diff --git a/src/jalview/gui/AnnotationPanel.java b/src/jalview/gui/AnnotationPanel.java index 3a4a197..e3d8de1 100755 --- a/src/jalview/gui/AnnotationPanel.java +++ b/src/jalview/gui/AnnotationPanel.java @@ -622,7 +622,7 @@ public class AnnotationPanel extends JPanel implements MouseListener, */ public void fastPaint(int horizontal) { - if ((horizontal == 0) || + if ((horizontal == 0) || gg==null || (av.alignment.getAlignmentAnnotation() == null) || (av.alignment.getAlignmentAnnotation().length < 1)) { @@ -1039,7 +1039,8 @@ public class AnnotationPanel extends JPanel implements MouseListener, y2 = (int)(y - (0-min / (range))*aa.graphHeight); g.setColor(Color.gray); - g.drawLine(x,y2,eRes*av.charWidth,y2); + + g.drawLine(x,y2,(eRes-sRes+1)*av.charWidth,y2); eRes = Math.min(eRes, aa.annotations.length-1);