]> git.lyx.org Git - features.git/commitdiff
Fix regression concerning collapsing insets after search.
authorRichard Kimberly Heck <rikiheck@lyx.org>
Fri, 15 Mar 2019 00:28:01 +0000 (20:28 -0400)
committerRichard Kimberly Heck <rikiheck@lyx.org>
Fri, 15 Mar 2019 00:30:50 +0000 (20:30 -0400)
To reproduce: Do a search for text in a footnote (say) that is
currently closed. Click inside the now open footnote. It will close
by itself.

We need to know whether we can go into the inset, not whether we can
edit once we're there.

src/insets/InsetCollapsible.cpp

index 31871419c9ce8a91822398215759836aac083991..0420452bb98d7f8483613e6d1e80681c5989844f 100644 (file)
@@ -476,7 +476,7 @@ Inset * InsetCollapsible::editXY(Cursor & cur, int x, int y)
 {
        //lyxerr << "InsetCollapsible: edit xy" << endl;
        if (geometry(cur.bv()) == ButtonOnly
-           || !editable()
+               || !descendable(cur.bv())
            || (view_[&cur.bv()].button_dim_.contains(x, y)
                && geometry(cur.bv()) != NoButton))
                return this;