Merge remote-tracking branch 'origin/bug/JAL-2739' into feature/JAL-2674take2
[jalview.git] / src / jalview / appletgui / SeqCanvas.java
index f59967d..5667b6e 100755 (executable)
@@ -491,16 +491,12 @@ public class SeqCanvas extends Panel implements ViewportListenerI
         HiddenColumns hidden = av.getAlignment().getHiddenColumns();
         g.setColor(Color.blue);
         int res;
-        List<Integer> positions = hidden.findHiddenRegionPositions();
+        List<Integer> positions = hidden.findHiddenRegionPositions(startRes,
+                endx + 1);
         for (int pos : positions)
         {
           res = pos - startRes;
 
-          if (res < 0 || res > endx - startRes)
-          {
-            continue;
-          }
-
           gg.fillPolygon(
                   new int[]
                   { res * avcharWidth - avcharHeight / 4,
@@ -510,7 +506,6 @@ public class SeqCanvas extends Panel implements ViewportListenerI
                   { ypos - (avcharHeight / 2), ypos - (avcharHeight / 2),
                       ypos - (avcharHeight / 2) + 8 },
                   3);
-
         }
       }