On Wed, Nov 06, 2019 at 04:11:44PM +0100, Pavel Sanda wrote: > On Mon, Nov 04, 2019 at 04:07:57PM +0100, Pavel Sanda wrote: > > Hi, > > as title says - in the current stable 2.3 note inset can't be dissolved via > > inset menu (the menu entry is greyed out). > > Reverting 67f77a07 fixes the problem (but introduces back #9954). > > JMarc, it might be easy cake for you?
This patch seems to fix the issue. For not having better idea I take descendable() as a reasonable proxy for insets in which dissolving inset makes sense. I'll commit to master unless someone has better idea. Pavel
diff --git a/src/insets/InsetText.cpp b/src/insets/InsetText.cpp index c7757f1673..8e240b2979 100644 --- a/src/insets/InsetText.cpp +++ b/src/insets/InsetText.cpp @@ -318,7 +318,9 @@ void InsetText::doDispatch(Cursor & cur, FuncRequest & cmd) bool const target_inset = cmd.argument().empty() || cmd.getArg(0) == insetName(lyxCode()); // cur.inset() is the tabular when this is a single cell (bug #9954) - bool const one_cell = cur.inset().nargs() == 1; + bool one_cell = cur.inset().nargs() == 1; + //if in tabular but in front of another inset + if (!one_cell && descendable(cur.bv())) one_cell = 1; if (!main_inset && target_inset && one_cell) { // Text::dissolveInset assumes that the cursor @@ -351,7 +353,9 @@ bool InsetText::getStatus(Cursor & cur, FuncRequest const & cmd, bool const target_inset = cmd.argument().empty() || cmd.getArg(0) == insetName(lyxCode()); // cur.inset() is the tabular when this is a single cell (bug #9954) - bool const one_cell = cur.inset().nargs() == 1; + bool one_cell = cur.inset().nargs() == 1; + //if in tabular but in front of another inset + if (!one_cell && descendable(cur.bv())) one_cell = 1; if (target_inset) status.setEnabled(!main_inset && one_cell);
-- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel