From: Jean-Marc Lasgouttes Date: Tue, 8 Mar 2011 14:41:01 +0000 (+0000) Subject: In the case of non-null paragraph separation, replace the hardcoded test for ERT... X-Git-Tag: 2.0.0~566 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=53e8746b4761daeb0a0f6a31019bf8dc5a8df5dc;p=features.git 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 --- diff --git a/src/TextMetrics.cpp b/src/TextMetrics.cpp index 4ca0592e74..7d967f37a2 100644 --- a/src/TextMetrics.cpp +++ b/src/TextMetrics.cpp @@ -1050,16 +1050,14 @@ Dimension TextMetrics::rowHeight(pit_type const pit, pos_type const first, if (first == 0 && topBottomSpace) { BufferParams const & bufparams = buffer.params(); // some parskips VERY EASY IMPLEMENTATION - if (bufparams.paragraph_separation - == BufferParams::ParagraphSkipSeparation - && inset.lyxCode() != ERT_CODE - && inset.lyxCode() != LISTINGS_CODE - && pit > 0 - && ((layout.isParagraph() && par.getDepth() == 0) - || (pars[pit - 1].layout().isParagraph() - && pars[pit - 1].getDepth() == 0))) - { - maxasc += bufparams.getDefSkip().inPixels(*bv_); + if (bufparams.paragraph_separation == BufferParams::ParagraphSkipSeparation + && !inset.getLayout().parbreakIsNewline() + && !par.layout().parbreak_is_newline + && pit > 0 + && ((layout.isParagraph() && par.getDepth() == 0) + || (pars[pit - 1].layout().isParagraph() + && pars[pit - 1].getDepth() == 0))) { + maxasc += bufparams.getDefSkip().inPixels(*bv_); } if (par.params().startOfAppendix())