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());
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();
}