]> git.lyx.org Git - lyx.git/blobdiff - src/paragraph_funcs.cpp
do what the FIXME suggested
[lyx.git] / src / paragraph_funcs.cpp
index 2b2f5ab18314fcd6f62b35ae3bd8607e2dd56906..e8241050b07b470a0bc76ddd4f21f543801f5d06 100644 (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.documentClass());
 
        // 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.documentClass());
        }
 
        // layout stays the same with latex-environments