This works:
if (cmd.x < xo(cur.bv()) + ADD_TO_TABULAR_WIDTH
|| cmd.x > xo(cur.bv()) + tabular.width()) {
row_type r = 0;
int h = yo(cur.bv()) - tabular.rowAscent(0);
for (;r < tabular.rowCount() && cmd.y > h; ++r) {
h += tabular.rowAscent(r);
h += tabular.rowDescent(r);
h += tabular.getAdditionalHeight(r);
}
cur.idx() = tabular.getFirstCellInRow(r);
cur.pos() = 0;
cur.resetAnchor();
cur.idx() = tabular.getLastCellInRow(r);
cur.pos() = cur.lastpos();
cur.selection() = true;
bvcur = cur;
break;
}
The problem was that you were setting the pit() to zero. But idx and
pit are in fact the same value. In InsetText they describe the
paragraph (pit) and in mathed the index (idx).
Stefan
Am 13.03.2008 um 00:50 schrieb Edwin Leuven:
Stefan Schimanski wrote:
White board? The text background?
some padding defined by ADD_TO_TABULAR_WIDTH at the beginning of
InsetTabular.cpp