]> git.lyx.org Git - features.git/commitdiff
Fix bug #8727: Text::breakParagraph() was always setting the default
authorRichard Heck <rgheck@lyx.org>
Fri, 7 Jun 2013 16:15:18 +0000 (12:15 -0400)
committerRichard Heck <rgheck@lyx.org>
Sun, 1 Dec 2013 18:29:45 +0000 (13:29 -0500)
layout, even if the paragraph in question requires plain layout.
(cherry picked from commit f8f1232465144016b5058d5aa60aff0fa5419bdc)

src/Text.cpp
status.20x

index ea3db714ecebf96587c34d2fe8092181edc5775f..1fefb1812493c6415a067b2255883a5f832b2ad7 100644 (file)
@@ -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;
        }
 
index 5f09acc3fd03d3007f30ae506e18b188c294cfb3..97165ed7ec6b71ace0456823df7680e57c47a534 100644 (file)
@@ -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).