diff --git a/src/TextClass.cpp b/src/TextClass.cpp index 83a7bf9e33..eb71d7380b 100644 --- a/src/TextClass.cpp +++ b/src/TextClass.cpp @@ -620,6 +620,7 @@ enum InsetLayoutTags { IL_LATEXPARAM, IL_LATEXTYPE, IL_LYXTYPE, + IL_MULTIPAR, IL_PREAMBLE, IL_END }; @@ -638,6 +639,7 @@ void TextClass::readInsetLayout(Lexer & lexrc, docstring const & name) { "latexparam", IL_LATEXPARAM }, { "latextype", IL_LATEXTYPE }, { "lyxtype", IL_LYXTYPE }, + { "multipar", IL_MULTIPAR }, { "preamble", IL_PREAMBLE } }; @@ -649,10 +651,11 @@ void TextClass::readInsetLayout(Lexer & lexrc, docstring const & name) string decoration; string latexname; string latexparam; - Font font(Font::ALL_INHERIT); - Font labelfont(Font::ALL_INHERIT); + Font font(defaultfont()); + Font labelfont(defaultfont()); Color::color bgcolor(Color::background); string preamble; + bool multipar(false); bool getout = false; while (!getout && lexrc.isOK()) { @@ -692,6 +695,10 @@ void TextClass::readInsetLayout(Lexer & lexrc, docstring const & name) labelfont.lyxRead(lexrc); labelfont.realize(defaultfont()); break; + case IL_MULTIPAR: + lexrc.next(); + multipar = lexrc.getBool(); + break; case IL_FONT: font.lyxRead(lexrc); font.realize(defaultfont()); @@ -724,6 +731,7 @@ void TextClass::readInsetLayout(Lexer & lexrc, docstring const & name) il.latextype = latextype; il.latexname = latexname; il.latexparam = latexparam; + il.multipar = multipar; il.font = font; il.labelfont = labelfont; il.bgcolor = bgcolor; diff --git a/src/TextClass.h b/src/TextClass.h index 4b432a15c0..4f50311df3 100644 --- a/src/TextClass.h +++ b/src/TextClass.h @@ -45,6 +45,7 @@ public: Font labelfont; Color::color bgcolor; std::string preamble; + bool multipar; }; diff --git a/src/insets/InsetFlex.cpp b/src/insets/InsetFlex.cpp index 378a21ad0c..4a4b3856a3 100644 --- a/src/insets/InsetFlex.cpp +++ b/src/insets/InsetFlex.cpp @@ -137,7 +137,7 @@ bool InsetFlex::getStatus(Cursor & cur, FuncRequest const & cmd, // paragraph breaks not allowed in flex insets case LFUN_BREAK_PARAGRAPH: case LFUN_BREAK_PARAGRAPH_SKIP: - status.enabled(false); + status.enabled(layout_.multipar); return true; default: