mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-11 03:03:06 +00:00
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:
parent
d3d4d31880
commit
53e8746b47
@ -1050,15 +1050,13 @@ 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
|
||||
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)))
|
||||
{
|
||||
&& pars[pit - 1].getDepth() == 0))) {
|
||||
maxasc += bufparams.getDefSkip().inPixels(*bv_);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user