From: Jean-Marc Lasgouttes Date: Wed, 11 Sep 2019 13:49:50 +0000 (+0200) Subject: Enable dissolve in undefined Flex inset context menu X-Git-Tag: lyx-2.4.0dev-acb2ca7b~1533 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=7c1c50d737d61aeccaa3ce277179db19ba3a7467;p=features.git Enable dissolve in undefined Flex inset context menu This is a hackish special case, so I had to add a hack... Fixes bug #8650. --- diff --git a/src/insets/InsetFlex.cpp b/src/insets/InsetFlex.cpp index 31828b615f..05c48f68ec 100644 --- a/src/insets/InsetFlex.cpp +++ b/src/insets/InsetFlex.cpp @@ -99,7 +99,9 @@ bool InsetFlex::getStatus(Cursor & cur, FuncRequest const & cmd, InsetLayout const & il = getLayout(); InsetLayout::InsetLyXType const type = translateLyXType(to_utf8(cmd.argument())); - if (il.lyxtype() == type) { + if (il.lyxtype() == type + || (il.name() == DocumentClass::plainInsetLayout().name() + && type == InsetLayout::CHARSTYLE)) { FuncRequest temp_cmd(LFUN_INSET_DISSOLVE); return InsetCollapsible::getStatus(cur, temp_cmd, flag); } else @@ -121,7 +123,9 @@ void InsetFlex::doDispatch(Cursor & cur, FuncRequest & cmd) InsetLayout::InsetLyXType const type = translateLyXType(to_utf8(cmd.argument())); - if (il.lyxtype() == type) { + if (il.lyxtype() == type + || (il.name() == DocumentClass::plainInsetLayout().name() + && type == InsetLayout::CHARSTYLE)) { FuncRequest temp_cmd(LFUN_INSET_DISSOLVE); InsetCollapsible::doDispatch(cur, temp_cmd); } else