mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-12 22:14:35 +00:00
When selecting whole row, reset properly the pit()
Since different cells in a row can have different number of paragraph, take care of setting cur.pit() when selecting a row/column. Fixes bug #9955
This commit is contained in:
parent
ef81af7037
commit
ba3269fd8f
@ -3965,9 +3965,11 @@ void InsetTabular::doDispatch(Cursor & cur, FuncRequest & cmd)
|
||||
|| cmd.x() > xo(cur.bv()) + tabular.width()) {
|
||||
row_type r = rowFromY(cur, cmd.y());
|
||||
cur.idx() = tabular.getFirstCellInRow(r);
|
||||
cur.pit() = 0;
|
||||
cur.pos() = 0;
|
||||
cur.resetAnchor();
|
||||
cur.idx() = tabular.getLastCellInRow(r);
|
||||
cur.pit() = cur.lastpit();
|
||||
cur.pos() = cur.lastpos();
|
||||
cur.setSelection(true);
|
||||
bvcur = cur;
|
||||
@ -3980,9 +3982,11 @@ void InsetTabular::doDispatch(Cursor & cur, FuncRequest & cmd)
|
||||
|| cmd.y() > y0 + tabular.height()) {
|
||||
col_type c = columnFromX(cur, cmd.x());
|
||||
cur.idx() = tabular.cellIndex(0, c);
|
||||
cur.pit() = 0;
|
||||
cur.pos() = 0;
|
||||
cur.resetAnchor();
|
||||
cur.idx() = tabular.cellIndex(tabular.nrows() - 1, c);
|
||||
cur.pit() = cur.lastpit();
|
||||
cur.pos() = cur.lastpos();
|
||||
cur.setSelection(true);
|
||||
bvcur = cur;
|
||||
|
Loading…
Reference in New Issue
Block a user