commit 08a3405181aed8b4c3d60af8cc3ac785b7e189cd
Author: Jean-Marc Lasgouttes <[email protected]>
Date:   Thu Feb 11 17:10:28 2021 +0100

    Fix correction of row in getPitAndRowNearY
    
    Now that the ascent of the paragraph metrics is not necessarily the
    ascent of the first row (see 907f0207), the test is too strict. Now it
    is more symmetrical wrt the !up case.
    
    Note that changing this part of code is associated with a
    non-negligible risk of creating a bug elsewhere.
    
    Fixes part of bug #12123.
---
 src/TextMetrics.cpp |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/TextMetrics.cpp b/src/TextMetrics.cpp
index 0f1814c..eb33944 100644
--- a/src/TextMetrics.cpp
+++ b/src/TextMetrics.cpp
@@ -1371,7 +1371,7 @@ Row const & TextMetrics::getPitAndRowNearY(int & y, 
pit_type & pit,
                                --rit;
                                y = yy;
                        }
-               } else if (up && yy != y) {
+               } else if (up && yy < y) {
                        if (rit != rlast) {
                                y = yy + rit->height();
                                ++rit;
-- 
lyx-cvs mailing list
[email protected]
http://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to