]> git.lyx.org Git - lyx.git/blobdiff - src/paragraph.C
Call an update before setting the_locking_inset = 0 as otherwise we
[lyx.git] / src / paragraph.C
index c702876d1debc9dc5319aeccea3bce0ef5f7ec30..055f0d435982d8b0aa3515d5475e76aa1b3f6e18 100644 (file)
@@ -884,7 +884,8 @@ void Paragraph::breakParagraph(BufferParams const & bparams,
                tmp->setLabelWidthString(params().labelWidthString());
        }
 
-       if (size() > pos || !size() || flag == 2) {
+       bool isempty = textclasslist[bparams.textclass][layout()].keepempty;
+       if (!isempty && (size() > pos || !size() || flag == 2)) {
                tmp->layout(layout());
                tmp->params().align(params().align());
                tmp->setLabelWidthString(params().labelWidthString());
@@ -915,7 +916,7 @@ void Paragraph::breakParagraph(BufferParams const & bparams,
        }
 
        // just an idea of me
-       if (!pos) {
+       if (!isempty && !pos) {
                tmp->params().lineTop(params().lineTop());
                tmp->params().pagebreakTop(params().pagebreakTop());
                tmp->params().spaceTop(params().spaceTop());