JAL-2505 updates after conflicting merge of JAL-2504
[jalview.git] / src / jalview / gui / SeqCanvas.java
index 0a1a99a..c2a2ccb 100755 (executable)
@@ -560,7 +560,7 @@ public class SeqCanvas extends JComponent
         g.setColor(Color.blue);
         int res;
         HiddenColumns hidden = av.getAlignment().getHiddenColumns();
-        for (int i = 0; i < hidden.getListOfCols().size(); i++)
+        for (int i = 0; i < hidden.getHiddenRegions().size(); i++)
         {
           res = hidden.findHiddenRegionPosition(i) - startRes;
 
@@ -593,7 +593,7 @@ public class SeqCanvas extends JComponent
                 (int) clip.getBounds().getHeight());
       }
 
-      drawPanel(g, startRes, endx, 0, al.getHeight(), ypos);
+      drawPanel(g, startRes, endx, 0, al.getHeight() - 1, ypos);
 
       if (av.isShowAnnotation())
       {
@@ -660,7 +660,7 @@ public class SeqCanvas extends JComponent
     else
     {
       List<int[]> regions = av.getAlignment().getHiddenColumns()
-              .getListOfCols();
+              .getHiddenRegions();
 
       int screenY = 0;
       int blockStart = startRes;
@@ -689,7 +689,7 @@ public class SeqCanvas extends JComponent
 
           g1.drawLine((blockEnd - blockStart + 1) * charWidth - 1,
                   0 + offset, (blockEnd - blockStart + 1) * charWidth - 1,
-                  (endSeq - startSeq) * charHeight + offset);
+                  (endSeq - startSeq + 1) * charHeight + offset);
         }
 
         g1.translate(-screenY * charWidth, 0);