From 71b8019d56142397994e0ef2d4244ada51f199d5 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Wed, 11 Sep 2019 15:49:50 +0200 Subject: [PATCH] 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 7c1c50d737d61aeccaa3ce277179db19ba3a7467) --- src/insets/InsetFlex.cpp | 8 ++++++-- status.23x | 2 ++ 2 files changed, 8 insertions(+), 2 deletions(-) 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 diff --git a/status.23x b/status.23x index b32797a362..6b2b027d81 100644 --- a/status.23x +++ b/status.23x @@ -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 -- 2.39.5