{
// if (x,y) is already visible don't do anything
boolean changedLocation = false;
- if (startRes > x || x > endRes || startSeq > y && y > endSeq)
+
+ int vis_x = al.getHiddenColumns().findColumnPosition(x);
+ int vis_y = al.getHiddenSequences().findIndexWithoutHiddenSeqs(y);
+
+ if (startRes > vis_x || vis_x > endRes
+ || startSeq > vis_y && vis_y > endSeq)
{
int width = getViewportWidth();
- int[] oldresvalues = updateStartEndRes(x, x + width - 1);
+ int[] oldresvalues = updateStartEndRes(vis_x, vis_x + width - 1);
- int startseq = y;
+ int startseq = vis_y;
int height = getViewportHeight();
if (startseq + height - 1 > getVisibleAlignmentHeight() - 1)
{