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.
This commit is contained in:
Jean-Marc Lasgouttes 2024-12-10 17:28:24 +01:00
parent 6bfa5f2e38
commit e3ec44ffe7

View File

@ -908,7 +908,15 @@ bool InsetMathHull::notifyCursorLeaves(Cursor const & old, Cursor & cur)
{
if (RenderPreview::previewMath()) {
reloadPreview(old);
/** 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;
}