From 225b4ceeafe280273cfe90c5a7d44d11c192498e Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Fri, 24 Mar 2006 15:29:33 +0000 Subject: [PATCH] 1 too many --- src/jalview/appletgui/SeqCanvas.java | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) 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(); - } } } -- 1.7.10.2