Enable dissolve in undefined Flex inset context menu

This is a hackish special case, so I had to add a hack...

Fixes bug #8650.

(cherry picked from commit 7c1c50d737)
This commit is contained in:
Jean-Marc Lasgouttes 2019-09-11 15:49:50 +02:00
parent 8e50b9569a
commit 71b8019d56
2 changed files with 8 additions and 2 deletions

View File

@ -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

View File

@ -140,6 +140,8 @@ What's new
- Hide "LaTeX (Clipboard)" entry from import menu (bug 11657).
- Enable dissolve in undefined Flex inset context menu (bug 8650).
* INTERNALS