ColumnSelection cs = av.getColumnSelection();
HiddenColumns hc = av.getAlignment().getHiddenColumns();
{
- int offp = (rseq!=null) ? rseq.findIndex(rseq.getStart()-1+colm) : colm;
+ int offp = (rseq!=null) ? rseq.findIndex(rseq.getStart()+colm) : colm;
- if (!av.hasHiddenColumns() || hc.isVisible(offp))
+ if (!av.hasHiddenColumns() || hc.isVisible(offp-1))
{
- if (cs.contains(offp))
+ if (cs.contains(offp-1))
{
- cs.removeElement(offp);
+ cs.removeElement(offp-1);
} else {
- cs.addElement(offp);
+ cs.addElement(offp-1);
}
}
}