Am Freitag, den 29.12.2017, 09:52 +0100 schrieb Jürgen Spitzmüller:
> Exactly. Frame is the thing to use if you need just a standard
> paragraph (nested standard is practically the same).
> 
> The on-screen display is sub-optimal, which leads to irritation. See
> http://www.lyx.org/trac/ticket/9261
> 
> But again, this is not a beamer frame only problem, but applies to
> all environments.

The attached patch addresses this. It paints the nested marker also for
follow-up paragraphs in a paragraph group.

IMHO this gives a better (and consistent) indication of what belongs to
 an environment.

What do you think?

Jürgen
diff --git a/src/RowPainter.cpp b/src/RowPainter.cpp
index 6fbc783b35..69b480d185 100644
--- a/src/RowPainter.cpp
+++ b/src/RowPainter.cpp
@@ -272,7 +272,12 @@ 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()
+	    && !text_.isFirstInSequence(row_.pit()))
+		++depth;
 
 	if (depth <= 0)
 		return;
@@ -283,6 +288,10 @@ 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()
+		    && !text_.isFirstInSequence(pit2))
+			++prev_depth;
 	}
 
 	depth_type next_depth = 0;
@@ -291,6 +300,10 @@ 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()
+		    && !text_.isFirstInSequence(pit2))
+			++next_depth;
 	}
 
 	for (depth_type i = 1; i <= depth; ++i) {

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to