Mark follow-up paragraphs in a paragraph group as nested.

This gives a more consistent indication of what belongs to an environment
(and semantically, such paragraphs are synonymous to nested standard
paragraphs)

Addresses part of #9261.
This commit is contained in:
Juergen Spitzmueller 2018-01-07 10:38:30 +01:00
parent f05ba30e88
commit 70d580fea7

View File

@ -285,7 +285,13 @@ void RowPainter::paintAppendix() const
void RowPainter::paintDepthBar() const
{
depth_type const depth = par_.getDepth();
depth_type depth = par_.getDepth();
// We also mark follow-up paragraphs in a paragraph group
if (par_.layout().isParagraphGroup()
&& par_.layout().labeltype == LABEL_STATIC
&& !text_.isFirstInSequence(row_.pit()))
++depth;
if (depth <= 0)
return;
@ -296,6 +302,11 @@ void RowPainter::paintDepthBar() const
if (row_.pos() == 0)
--pit2;
prev_depth = pars_[pit2].getDepth();
// We also mark follow-up paragraphs in a paragraph group
if (pars_[pit2].layout().isParagraphGroup()
&& pars_[pit2].layout().labeltype == LABEL_STATIC
&& !text_.isFirstInSequence(pit2))
++prev_depth;
}
depth_type next_depth = 0;
@ -304,6 +315,11 @@ void RowPainter::paintDepthBar() const
if (row_.endpos() >= pars_[pit2].size())
++pit2;
next_depth = pars_[pit2].getDepth();
// We also mark follow-up paragraphs in a paragraph group
if (pars_[pit2].layout().isParagraphGroup()
&& pars_[pit2].layout().labeltype == LABEL_STATIC
&& !text_.isFirstInSequence(pit2))
++next_depth;
}
for (depth_type i = 1; i <= depth; ++i) {