From: amwaterhouse Date: Fri, 24 Mar 2006 15:29:33 +0000 (+0000) Subject: 1 too many X-Git-Tag: Root_VamJalview_2_07b+~17 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=225b4ceeafe280273cfe90c5a7d44d11c192498e;p=jalview.git 1 too many --- diff --git a/src/jalview/appletgui/SeqCanvas.java b/src/jalview/appletgui/SeqCanvas.java index 5afbe23..465dd38 100755 --- a/src/jalview/appletgui/SeqCanvas.java +++ b/src/jalview/appletgui/SeqCanvas.java @@ -359,12 +359,19 @@ public class SeqCanvas av.endRes = av.startRes + cWidth; - int endx = (startRes + cWidth) - 1; + int endx; int ypos = hgap; while ((ypos <= canvasHeight) && (startRes < av.alignment.getWidth())) { + endx = startRes + cWidth; + + if (endx > al.getWidth()) + { + endx = al.getWidth(); + } + g.setColor(Color.black); if (av.scaleLeftWrapped) @@ -386,13 +393,6 @@ public class SeqCanvas drawNorthScale(g, startRes, endx, ypos); } - - if (av.vconsensus!=null && av.alignment.getWidth() >= av.vconsensus.size()) - { - endx = av.vconsensus.size() - 2; - } - - if(g.getClip()==null) g.setClip(0, 0, cWidth * av.charWidth, canvasHeight); @@ -406,7 +406,7 @@ public class SeqCanvas if(annotations==null) annotations = new AnnotationPanel(av); - annotations.drawComponent( g, startRes, endx + 1); + annotations.drawComponent( g, startRes, endx ); g.translate(0, -cHeight - ypos-4); } g.translate(-LABEL_WEST, 0); @@ -415,12 +415,6 @@ public class SeqCanvas startRes += cWidth; - endx = (startRes + cWidth) - 1; - - if (endx > al.getWidth()) - { - endx = al.getWidth(); - } } }