1 too many
authoramwaterhouse <Andrew Waterhouse>
Fri, 24 Mar 2006 15:29:33 +0000 (15:29 +0000)
committeramwaterhouse <Andrew Waterhouse>
Fri, 24 Mar 2006 15:29:33 +0000 (15:29 +0000)
src/jalview/appletgui/SeqCanvas.java

index 5afbe23..465dd38 100755 (executable)
@@ -359,12 +359,19 @@ public class SeqCanvas
     av.endRes = av.startRes + cWidth;\r
 \r
 \r
-    int endx = (startRes + cWidth) - 1;\r
+    int endx;\r
     int ypos = hgap;\r
 \r
 \r
     while ((ypos <= canvasHeight) && (startRes < av.alignment.getWidth()))\r
     {\r
+      endx = startRes + cWidth;\r
+\r
+      if (endx > al.getWidth())\r
+      {\r
+        endx = al.getWidth();\r
+      }\r
+\r
         g.setColor(Color.black);\r
 \r
         if (av.scaleLeftWrapped)\r
@@ -386,13 +393,6 @@ public class SeqCanvas
             drawNorthScale(g, startRes, endx, ypos);\r
         }\r
 \r
-\r
-        if (av.vconsensus!=null && av.alignment.getWidth() >= av.vconsensus.size())\r
-        {\r
-          endx = av.vconsensus.size() - 2;\r
-        }\r
-\r
-\r
         if(g.getClip()==null)\r
           g.setClip(0, 0, cWidth * av.charWidth, canvasHeight);\r
 \r
@@ -406,7 +406,7 @@ public class SeqCanvas
           if(annotations==null)\r
             annotations = new AnnotationPanel(av);\r
 \r
-          annotations.drawComponent( g, startRes, endx + 1);\r
+          annotations.drawComponent( g, startRes, endx );\r
           g.translate(0, -cHeight - ypos-4);\r
         }\r
         g.translate(-LABEL_WEST, 0);\r
@@ -415,12 +415,6 @@ public class SeqCanvas
 \r
 \r
         startRes += cWidth;\r
-        endx = (startRes + cWidth) - 1;\r
-\r
-        if (endx > al.getWidth())\r
-        {\r
-            endx = al.getWidth();\r
-        }\r
         }\r
 \r
   }\r