This commit is contained in:
Juergen Spitzmueller 2022-08-06 19:00:36 +02:00
parent 8ac177f656
commit 4ba989000c

View File

@ -3182,19 +3182,19 @@ bool Text::getStatus(Cursor & cur, FuncRequest const & cmd,
break; break;
case LFUN_FLEX_INSERT: { case LFUN_FLEX_INSERT: {
code = FLEX_CODE; code = FLEX_CODE;
string s = cmd.getArg(0); docstring s = from_ascii("Flex:") + from_utf8(cmd.getArg(0));
if (!cur.buffer()->params().documentClass().hasInsetLayout(from_utf8(s))) if (!cur.buffer()->params().documentClass().hasInsetLayout(s))
enable = false; enable = false;
else { else {
InsetLayout il = InsetLyXType ilt =
cur.buffer()->params().documentClass().insetLayout(from_utf8(s)); cur.buffer()->params().documentClass().insetLayout(s).lyxtype();
if (il.lyxtype() != InsetLyXType::CHARSTYLE && if (ilt != InsetLyXType::CHARSTYLE
il.lyxtype() != InsetLyXType::CUSTOM && && ilt != InsetLyXType::CUSTOM
il.lyxtype ()!= InsetLyXType::STANDARD) && ilt != InsetLyXType::STANDARD)
enable = false; enable = false;
} }
break; break;
} }
case LFUN_BOX_INSERT: case LFUN_BOX_INSERT:
code = BOX_CODE; code = BOX_CODE;
break; break;