]> git.lyx.org Git - features.git/commitdiff
Tabular::editXY should not touch the selection
authorGuillaume Munch <gm@lyx.org>
Fri, 3 Mar 2017 22:26:58 +0000 (23:26 +0100)
committerGuillaume Munch <gm@lyx.org>
Sun, 5 Mar 2017 07:45:52 +0000 (08:45 +0100)
src/insets/Inset.h
src/insets/InsetTabular.cpp

index 526ede20b71760f52966f4daa953de40e8c334e5..b8fd6377d73f836f15994ebab7a91d58c45e775e 100644 (file)
@@ -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
index a6a280551a1e988e02d933a0a97111c564cb3b70..88817357c16c663aa91c5aeef8ef3777ec457c80 100644 (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)
 {
        //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);