Simplify and fix a bug.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23262 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Richard Heck 2008-02-26 22:35:09 +00:00
parent d0de0f53ef
commit 3c944f7bf2

View File

@ -76,10 +76,7 @@ void breakParagraph(BufferParams const & bparams,
tmp->setInsetOwner(par.inInset());
// without doing that we get a crash when typing <Return> at the
// end of a paragraph
if (par.useEmptyLayout())
tmp->setLayout(bparams.textClass().emptyLayout());
else
tmp->setLayout(bparams.textClass().defaultLayout());
tmp->setEmptyOrDefaultLayout(bparams.textClass());
// layout stays the same with latex-environments
if (keep_layout) {
@ -144,7 +141,7 @@ void breakParagraph(BufferParams const & bparams,
par.params().clear();
// do not lose start of appendix marker (bug 4212)
par.params().startOfAppendix(soa);
par.setLayout(bparams.textClass().defaultLayout());
par.setEmptyOrDefaultLayout(bparams.textClass());
}
// layout stays the same with latex-environments