From 3c944f7bf25029a238349038cd71bd7c9c68fdd6 Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Tue, 26 Feb 2008 22:35:09 +0000 Subject: [PATCH] Simplify and fix a bug. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23262 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/paragraph_funcs.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/paragraph_funcs.cpp b/src/paragraph_funcs.cpp index 2b2f5ab183..7d984f61ad 100644 --- a/src/paragraph_funcs.cpp +++ b/src/paragraph_funcs.cpp @@ -76,10 +76,7 @@ void breakParagraph(BufferParams const & bparams, tmp->setInsetOwner(par.inInset()); // without doing that we get a crash when typing 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