commit f8f1232465144016b5058d5aa60aff0fa5419bdc
Author: Richard Heck <[email protected]>
Date:   Fri Jun 7 12:15:18 2013 -0400

    Fix bug #8727: Text::breakParagraph() was always setting the default
    layout, even if the paragraph in question requires plain layout.

diff --git a/src/Text.cpp b/src/Text.cpp
index 5bb7041..8e8d641 100644
--- a/src/Text.cpp
+++ b/src/Text.cpp
@@ -735,8 +735,11 @@ void Text::breakParagraph(Cursor & cur, bool inverse_logic)
        if (cur.lastpos() == 0 && !cpar.allowEmpty()) {
                if (changeDepthAllowed(cur, DEC_DEPTH))
                        changeDepth(cur, DEC_DEPTH);
-               else 
-                       setLayout(cur, tclass.defaultLayoutName());
+               else {
+                       docstring const & lay = cur.paragraph().usePlainLayout()
+                           ? tclass.plainLayoutName() : 
tclass.defaultLayoutName();
+                       setLayout(cur, lay);
+               }
                return;
        }
 

Reply via email to