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

layout, even if the paragraph in question requires plain layout.
(cherry picked from commit f8f1232465)
This commit is contained in:
Richard Heck 2013-06-07 12:15:18 -04:00
parent 0a4e9691eb
commit 4f09c28bdd
2 changed files with 7 additions and 2 deletions

View File

@ -695,8 +695,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;
}

View File

@ -90,6 +90,8 @@ What's new
- Disable invalid actions in empty outliner that could trigger a crash
(bug 8885).
- Fix warning when setting layout box when Plain Layout is used (bug 8727).
- Fix bug where searching for next change may leave an empty paragraph
where cursor was (bug 3199).