mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 05:25:26 +00:00
Fix bug 5145. InsetTabular was resetting cur.idx() but not cur.pit() or cur.pos(),
leaving them possibly invalid. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26100 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
9374e68bfd
commit
b2f5782253
@ -3165,6 +3165,10 @@ void InsetTabular::doDispatch(Cursor & cur, FuncRequest & cmd)
|
||||
if (rowselect_) {
|
||||
row_type r = rowFromY(cur, cmd.y);
|
||||
cur.idx() = tabular.getLastCellInRow(r);
|
||||
// we need to reset the cursor's pit and pos now, as the old ones
|
||||
// may no longer be valid.
|
||||
cur.pit() = 0;
|
||||
cur.pos() = 0;
|
||||
bvcur.setCursor(cur);
|
||||
bvcur.selection() = true;
|
||||
break;
|
||||
@ -3173,6 +3177,10 @@ void InsetTabular::doDispatch(Cursor & cur, FuncRequest & cmd)
|
||||
if (colselect_) {
|
||||
col_type c = columnFromX(cur, cmd.x);
|
||||
cur.idx() = tabular.cellIndex(tabular.row_info.size() - 1, c);
|
||||
// we need to reset the cursor's pit and pos now, as the old ones
|
||||
// may no longer be valid.
|
||||
cur.pit() = 0;
|
||||
cur.pos() = 0;
|
||||
bvcur.setCursor(cur);
|
||||
bvcur.selection() = true;
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user