[LyX/master] Fix correction of row in getPitAndRowNearY
Jean-Marc Lasgouttes
lasgouttes at lyx.org
Fri Feb 12 17:31:51 UTC 2021
commit 08a3405181aed8b4c3d60af8cc3ac785b7e189cd
Author: Jean-Marc Lasgouttes <lasgouttes at lyx.org>
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;
More information about the lyx-cvs
mailing list