]> git.lyx.org Git - lyx.git/blobdiff - src/paragraph_funcs.C
remove redundant lyxerr.debugging checks; macro LYXERR already checks whether the...
[lyx.git] / src / paragraph_funcs.C
index 5c9b6b972b315a0cba92de687f2f89901ddcff04..5b4dd00a3f760ad4c10151d85a00973175aa3e64 100644 (file)
@@ -68,9 +68,6 @@ void breakParagraph(BufferParams const & bparams,
 
        Paragraph & par = pars[par_offset];
 
-       // we will invalidate the row cache
-       par.rows().clear();
-
        // without doing that we get a crash when typing <Return> at the
        // end of a paragraph
        tmp->layout(bparams.getLyXTextClass().defaultLayout());
@@ -191,7 +188,7 @@ void mergeParagraph(BufferParams const & bparams,
        // marked as unmodified. Otherwise, its change is adopted by the first
        // character of the next paragraph.
        if (par.lookupChange(par.size()).type != Change::UNCHANGED) {
-               lyxerr[Debug::CHANGES] <<
+               LYXERR(Debug::CHANGES) <<
                   "merging par with inserted/deleted end-of-par character" << endl;
                par.setChange(par.size(), Change(Change::UNCHANGED));
        }
@@ -245,10 +242,12 @@ bool isFirstInSequence(pit_type par_offset, ParagraphList const & pars)
 
        pit_type dhook_offset = depthHook(par_offset, pars, par.getDepth());
 
+       if (dhook_offset == par_offset)
+               return true;
+
        Paragraph const & dhook = pars[dhook_offset];
 
-       return dhook_offset == par_offset
-               || dhook.layout() != par.layout()
+       return dhook.layout() != par.layout()
                || dhook.getDepth() != par.getDepth();
 }