Fix bug #8727: Text::breakParagraph() was always setting the default

layout, even if the paragraph in question requires plain layout.
This commit is contained in:
Richard Heck 2013-06-07 12:15:18 -04:00
parent b3a8abffc7
commit f8f1232465

View File

@ -735,8 +735,11 @@ void Text::breakParagraph(Cursor & cur, bool inverse_logic)
if (cur.lastpos() == 0 && !cpar.allowEmpty()) {
if (changeDepthAllowed(cur, DEC_DEPTH))
changeDepth(cur, DEC_DEPTH);
else
setLayout(cur, tclass.defaultLayoutName());
else {
docstring const & lay = cur.paragraph().usePlainLayout()
? tclass.plainLayoutName() : tclass.defaultLayoutName();
setLayout(cur, lay);
}
return;
}