commit e3ec44ffe78c1a22250c9ec22be8645077126b1d
Author: Jean-Marc Lasgouttes <[email protected]>
Date: Tue Dec 10 17:28:24 2024 +0100
Fixup 5e857883: update screen when clicking away from preview
This is a regression in 5e857883 that comes from the fact that the
Update::singlePar flag does not operate on the paragraph that may be
modified but on the one where the cursor currently lies.
Until this is fixed, we do a full update when this situation is encountered.
Fixes bug #13128.
---
src/mathed/InsetMathHull.cpp | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/src/mathed/InsetMathHull.cpp b/src/mathed/InsetMathHull.cpp
index 32a0d81bf0..efefb04fa0 100644
--- a/src/mathed/InsetMathHull.cpp
+++ b/src/mathed/InsetMathHull.cpp
@@ -908,7 +908,15 @@ bool InsetMathHull::notifyCursorLeaves(Cursor const & old,
Cursor & cur)
{
if (RenderPreview::previewMath()) {
reloadPreview(old);
- cur.screenUpdateFlags(Update::SinglePar);
+ /** FIXME: currently, SinglePar operates on the current
+ * paragraph at processUpdateFlags time (here cur) and not the
+ * paragraph where the change happened (old). When this is
+ * fixed, the following test will become useless.
+ */
+ if (&old.innerParagraph() == &cur.innerParagraph())
+ cur.screenUpdateFlags(Update::SinglePar);
+ else
+ cur.screenUpdateFlags(Update::Force);
}
return false;
}
--
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs