Printing wrapped alignment corrected
authoramwaterhouse <Andrew Waterhouse>
Fri, 8 Apr 2005 15:42:32 +0000 (15:42 +0000)
committeramwaterhouse <Andrew Waterhouse>
Fri, 8 Apr 2005 15:42:32 +0000 (15:42 +0000)
src/jalview/gui/AlignmentPanel.java

index 73cee2d..a6ebc6d 100755 (executable)
@@ -537,11 +537,13 @@ public class AlignmentPanel extends GAlignmentPanel implements AdjustmentListene
     // Draw the ids\r
     pg.setClip(0,0,pwidth, noChunksOnPage*chunkHeight);\r
 \r
-    int row = pi*noChunksOnPage;\r
     pg.setColor(Color.black);\r
-    for(int ypos=2*av.charHeight;\r
-        ypos <= pheight && row*chunkWidth<da.getWidth();\r
-        ypos += chunkHeight, row++ )\r
+\r
+    int rowSize =  av.getEndRes() - av.getStartRes();\r
+    // Draw the rest of the panels\r
+\r
+    for(int ypos=2*av.charHeight, row=av.getEndRes(); row<av.alignment.getWidth();\r
+        ypos += av.chunkHeight, row+=rowSize )\r
     {\r
       for (int i = 0; i < endy; i++)\r
       {\r