From 354897f6d9c03056a8e16f36e7153ec513eae646 Mon Sep 17 00:00:00 2001 From: Guillaume Munch Date: Fri, 3 Mar 2017 23:26:58 +0100 Subject: [PATCH] Tabular::editXY should not touch the selection --- src/insets/Inset.h | 2 ++ src/insets/InsetTabular.cpp | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/insets/Inset.h b/src/insets/Inset.h index 526ede20b7..b8fd6377d7 100644 --- a/src/insets/Inset.h +++ b/src/insets/Inset.h @@ -183,6 +183,8 @@ public: virtual void edit(Cursor & cur, bool front, EntryDirection entry_from = ENTRY_DIRECTION_IGNORE); /// 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); /// compute the size of the object returned in dim diff --git a/src/insets/InsetTabular.cpp b/src/insets/InsetTabular.cpp index a6a280551a..88817357c1 100644 --- a/src/insets/InsetTabular.cpp +++ b/src/insets/InsetTabular.cpp @@ -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) { //lyxerr << "InsetTabular::editXY: " << this << endl; - cur.selection(false); cur.push(*this); cur.idx() = getNearestCell(cur.bv(), x, y); return cur.bv().textMetrics(&cell(cur.idx())->text()).editXY(cur, x, y); -- 2.39.2