]> git.lyx.org Git - features.git/commitdiff
Fix bug 4212
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Fri, 7 Sep 2007 09:55:57 +0000 (09:55 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Fri, 7 Sep 2007 09:55:57 +0000 (09:55 +0000)
* Text2.cpp (deleteEmptyParagraphMechanism):
* paragraph_func.cpp (breakParagraph): make sure that the start of
appendix marker is not lost when deleting or breaking a paragraph

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20121 a592a061-630c-0410-9148-cb99ea01b6c8

src/Text2.cpp
src/paragraph_funcs.cpp

index 4c47d0811f6c66f8b956755fe9390d0a78f0ea33..d3025d1845a757a635f28624f01f4655e002e50f 100644 (file)
@@ -813,7 +813,11 @@ bool Text::deleteEmptyParagraphMechanism(Cursor & cur,
                           max(old.pit() - 1, pit_type(0)),
                           min(old.pit() + 1, old.lastpit()));
                ParagraphList & plist = old.text()->paragraphs();
+               bool const soa = oldpar.params().startOfAppendix();
                plist.erase(boost::next(plist.begin(), old.pit()));
+               // do not lose start of appendix marker (bug 4212)
+               if (soa)
+                       boost::next(plist.begin(), old.pit())->params().startOfAppendix(true);
 
                // see #warning (FIXME?) above 
                if (cur.depth() >= old.depth()) {
index f5dba1d830b179aa4653bd8a19163710ce621782..ff4812cfceebae1d8d26551b00da5a6c782318f5 100644 (file)
@@ -134,7 +134,10 @@ void breakParagraph(BufferParams const & bparams,
        }
 
        if (!isempty) {
+               bool const soa = par.params().startOfAppendix();
                par.params().clear();
+               // do not lose start of appendix marker (bug 4212)
+               par.params().startOfAppendix(soa);
                par.layout(bparams.getTextClass().defaultLayout());
        }