]> git.lyx.org Git - features.git/blobdiff - src/Text.cpp
* src/paragraph_funcs.cpp (breakParagraph): change parameter 'flag' to
[features.git] / src / Text.cpp
index fc99e1336ea205e784685372f505e799267e48df..2b7c84a23fdabc383c4d8c5c5a06613e61b742ca 100644 (file)
@@ -357,7 +357,7 @@ double Text::spacing(Buffer const & buffer,
 }
 
 
-void Text::breakParagraph(Cursor & cur, bool keep_layout)
+void Text::breakParagraph(Cursor & cur, bool inverse_logic)
 {
        BOOST_ASSERT(this == cur.text());
 
@@ -382,11 +382,9 @@ void Text::breakParagraph(Cursor & cur, bool keep_layout)
                cpar.eraseChar(cur.pos(), cur.buffer().params().trackChanges);
 
        // What should the layout for the new paragraph be?
-       int preserve_layout = 0;
-       if (keep_layout)
-               preserve_layout = 2;
-       else
-               preserve_layout = layout->isEnvironment();
+       bool keep_layout = inverse_logic ? 
+               !layout->isEnvironment() 
+               : layout->isEnvironment();
 
        // We need to remember this before we break the paragraph, because
        // that invalidates the layout variable
@@ -396,7 +394,7 @@ void Text::breakParagraph(Cursor & cur, bool keep_layout)
        bool const isempty = cpar.allowEmpty() && cpar.empty();
 
        lyx::breakParagraph(cur.buffer().params(), paragraphs(), cpit,
-                        cur.pos(), preserve_layout);
+                        cur.pos(), keep_layout);
 
        // After this, neither paragraph contains any rows!