commit aad18e969a7fad69a196b8de737d18f33a7ab9b0 Author: Daniel Ramoeller <d....@web.de> Date: Thu Oct 21 09:29:54 2021 +0200
Combine the separation between different layouts (with same depth) Fix for #12402. --- src/TextMetrics.cpp | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/src/TextMetrics.cpp b/src/TextMetrics.cpp index f68292a..53b6838 100644 --- a/src/TextMetrics.cpp +++ b/src/TextMetrics.cpp @@ -1202,7 +1202,10 @@ int TextMetrics::parTopSpacing(pit_type const pit) const && prevpar.getLabelWidthString() == par.getLabelWidthString()) { layoutasc = layout.itemsep * dh; } else if (pit != 0 && layout.topsep > 0) - layoutasc = layout.topsep * dh; + // combine the separation between different layouts (with same depth) + layoutasc = max(0.0, + prevpar.getDepth() != par.getDepth() ? layout.topsep + : layout.topsep - prevpar.layout().bottomsep) * dh; asc += int(layoutasc * 2 / (2 + pars[pit].getDepth())); -- lyx-cvs mailing list lyx-cvs@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-cvs