X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fparagraph_funcs.C;h=4ec57ef3eed6e957a8e90b7da21ed677d4460512;hb=8765ab59cdddad67284007813ef25934ea0042ce;hp=5c9b6b972b315a0cba92de687f2f89901ddcff04;hpb=9095690af0c90bfc80834b5d5a49bfb32ff929e2;p=lyx.git diff --git a/src/paragraph_funcs.C b/src/paragraph_funcs.C index 5c9b6b972b..4ec57ef3ee 100644 --- a/src/paragraph_funcs.C +++ b/src/paragraph_funcs.C @@ -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 at the // end of a paragraph tmp->layout(bparams.getLyXTextClass().defaultLayout()); @@ -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(); }