In the case of non-null paragraph separation, replace the hardcoded test for ERT and LISTINGS insets by proper check for newLineIsParBreak.

This fixes the display of sweave Chunks in sweave.lyx example, which uses parskip instead of indent.

The rest of the changes are just white space


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37881 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jean-Marc Lasgouttes 2011-03-08 14:41:01 +00:00
parent d3d4d31880
commit 53e8746b47

View File

@ -1050,15 +1050,13 @@ Dimension TextMetrics::rowHeight(pit_type const pit, pos_type const first,
if (first == 0 && topBottomSpace) { if (first == 0 && topBottomSpace) {
BufferParams const & bufparams = buffer.params(); BufferParams const & bufparams = buffer.params();
// some parskips VERY EASY IMPLEMENTATION // some parskips VERY EASY IMPLEMENTATION
if (bufparams.paragraph_separation if (bufparams.paragraph_separation == BufferParams::ParagraphSkipSeparation
== BufferParams::ParagraphSkipSeparation && !inset.getLayout().parbreakIsNewline()
&& inset.lyxCode() != ERT_CODE && !par.layout().parbreak_is_newline
&& inset.lyxCode() != LISTINGS_CODE
&& pit > 0 && pit > 0
&& ((layout.isParagraph() && par.getDepth() == 0) && ((layout.isParagraph() && par.getDepth() == 0)
|| (pars[pit - 1].layout().isParagraph() || (pars[pit - 1].layout().isParagraph()
&& pars[pit - 1].getDepth() == 0))) && pars[pit - 1].getDepth() == 0))) {
{
maxasc += bufparams.getDefSkip().inPixels(*bv_); maxasc += bufparams.getDefSkip().inPixels(*bv_);
} }