commit 4f09c28bdd2495c9fc3642abfd4f61254377dd17
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.
    (cherry picked from commit f8f1232465144016b5058d5aa60aff0fa5419bdc)

diff --git a/src/Text.cpp b/src/Text.cpp
index ea3db71..1fefb18 100644
--- a/src/Text.cpp
+++ b/src/Text.cpp
@@ -695,8 +695,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;
        }
 
diff --git a/status.20x b/status.20x
index 5f09acc..97165ed 100644
--- a/status.20x
+++ b/status.20x
@@ -89,6 +89,8 @@ What's new
 
 - Disable invalid actions in empty outliner that could trigger a crash
   (bug 8885).
+ 
+- Fix warning when setting layout box when Plain Layout is used (bug 8727).
 
 - Fix bug where searching for next change may leave an empty paragraph
   where cursor was (bug 3199).

Reply via email to