Tabular::editXY should not touch the selection

This commit is contained in:
Guillaume Munch 2017-03-03 23:26:58 +01:00
parent 494ce6647a
commit 354897f6d9
2 changed files with 2 additions and 1 deletions

View File

@ -183,6 +183,8 @@ public:
virtual void edit(Cursor & cur, bool front, virtual void edit(Cursor & cur, bool front,
EntryDirection entry_from = ENTRY_DIRECTION_IGNORE); EntryDirection entry_from = ENTRY_DIRECTION_IGNORE);
/// cursor enters /// cursor enters
/// Note: this method must preserve the selection status. See:
/// https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg199001.html
virtual Inset * editXY(Cursor & cur, int x, int y); virtual Inset * editXY(Cursor & cur, int x, int y);
/// compute the size of the object returned in dim /// compute the size of the object returned in dim

View File

@ -5185,7 +5185,6 @@ int InsetTabular::dist(BufferView & bv, idx_type const cell, int x, int y) const
Inset * InsetTabular::editXY(Cursor & cur, int x, int y) Inset * InsetTabular::editXY(Cursor & cur, int x, int y)
{ {
//lyxerr << "InsetTabular::editXY: " << this << endl; //lyxerr << "InsetTabular::editXY: " << this << endl;
cur.selection(false);
cur.push(*this); cur.push(*this);
cur.idx() = getNearestCell(cur.bv(), x, y); cur.idx() = getNearestCell(cur.bv(), x, y);
return cur.bv().textMetrics(&cell(cur.idx())->text()).editXY(cur, x, y); return cur.bv().textMetrics(&cell(cur.idx())->text()).editXY(cur, x, y);