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()
+ && !text_.isFirstInSequence(row_.pit()))
+ ++depth;
if (depth <= 0)
return;
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()
+ && !text_.isFirstInSequence(pit2))
+ ++prev_depth;
}
depth_type next_depth = 0;
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()
+ && !text_.isFirstInSequence(pit2))
+ ++next_depth;
}
for (depth_type i = 1; i <= depth; ++i) {