mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-10 20:04:46 +00:00
Fix bug, and introduce MultiPar parameter for flex insets
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20869 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
89c7ca6a28
commit
5a2deb94c3
@ -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;
|
||||
|
@ -45,6 +45,7 @@ public:
|
||||
Font labelfont;
|
||||
Color::color bgcolor;
|
||||
std::string preamble;
|
||||
bool multipar;
|
||||
};
|
||||
|
||||
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user