]> git.lyx.org Git - features.git/commitdiff
* src/paragraph_funcs.C: fix end-of-par handling in
authorMichael Schmitt <michael.schmitt@teststep.org>
Sun, 26 Nov 2006 11:14:16 +0000 (11:14 +0000)
committerMichael Schmitt <michael.schmitt@teststep.org>
Sun, 26 Nov 2006 11:14:16 +0000 (11:14 +0000)
breakParagraph(); remove ancient comment on user-friendly
layout handling

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

src/paragraph_funcs.C

index 1fed78e8919291b385b56b2deadfc61ee8ff4732..f1af41bf81722557fb91c7ca04b25f9bfbc30eb1 100644 (file)
@@ -75,9 +75,6 @@ void breakParagraph(BufferParams const & bparams,
        // remember to set the inset_owner
        tmp->setInsetOwner(par.inInset());
 
-       // this is an idea for a more userfriendly layout handling, I will
-       // see what the users say
-
        // layout stays the same with latex-environments
        if (flag) {
                tmp->layout(par.layout());
@@ -101,7 +98,7 @@ void breakParagraph(BufferParams const & bparams,
                tmp->params().depth(par.params().depth());
                tmp->params().noindent(par.params().noindent());
 
-               // copy everything behind the break-position
+               // move everything behind the break position
                // to the new paragraph
 
                /* Note: if !keepempty, empty() == true, then we reach
@@ -118,6 +115,11 @@ void breakParagraph(BufferParams const & bparams,
                }
        }
 
+       // Move over the end-of-par change information
+       tmp->setChange(tmp->size(), par.lookupChange(par.size()));
+       par.setChange(par.size(), Change(bparams.trackChanges ?
+                                          Change::INSERTED : Change::UNCHANGED));
+
        if (pos) {
                // Make sure that we keep the language when
                // breaking paragraph.
@@ -142,15 +144,6 @@ void breakParagraph(BufferParams const & bparams,
                par.setLabelWidthString(tmp->params().labelWidthString());
                par.params().depth(tmp->params().depth());
        }
-
-       // subtle, but needed to get empty pars working right
-       if (bparams.trackChanges) {
-               // FIXME: Change tracking (MG)
-               // if (!par.size())
-               //      set 'par' text to INSERTED in CT mode; clear CT info otherwise
-               // else if (!tmp->size())
-               //      set 'tmp' text to INSERTED in CT mode; clear CT info otherwise
-       }
 }