commit f6e31cb4797c88cf1647ce31fded82e9261c3f99
Author: Jean-Marc Lasgouttes <[email protected]>
Date: Wed Jul 2 15:26:11 2025 +0200
Fixup 971514b1: better fix, ported to InsetIPA now.
Related to bug #13193.
---
src/insets/InsetIPA.cpp | 9 +++++++++
src/insets/InsetPreview.cpp | 4 ++--
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/src/insets/InsetIPA.cpp b/src/insets/InsetIPA.cpp
index 355878457b..8a26548f95 100644
--- a/src/insets/InsetIPA.cpp
+++ b/src/insets/InsetIPA.cpp
@@ -162,8 +162,17 @@ void InsetIPA::draw(PainterInfo & pi, int x, int y) const
void InsetIPA::edit(Cursor & cur, bool front, EntryDirection entry_from)
{
+ bool const has_preview = previewState(&cur.bv());
cur.push(*this);
InsetText::edit(cur, front, entry_from);
+ if (has_preview) {
+ // The insets contents is in general different from the one of
+ // the instant preview image, so we have to indicate to the
+ // BufferView that a metrics update is needed.
+ // FIXME : it should be possible to trigger a SinglePar update
+ // on the parent paragraph.
+ cur.screenUpdateFlags(Update::Force);
+ }
}
diff --git a/src/insets/InsetPreview.cpp b/src/insets/InsetPreview.cpp
index 42de1e4dac..3c77dce82d 100644
--- a/src/insets/InsetPreview.cpp
+++ b/src/insets/InsetPreview.cpp
@@ -194,12 +194,12 @@ void InsetPreview::edit(Cursor & cur, bool front,
EntryDirection entry_from)
cur.push(*this);
InsetText::edit(cur, front, entry_from);
if (has_preview) {
- // The inset formula dimension is in general different from the
+ // The inset contents dimension is in general different from the
// one of the instant preview image, so we have to indicate to
the
// BufferView that a metrics update is needed.
// FIXME : it should be possible to trigger a SinglePar update
// on the parent paragraph.
- cur.bv().processUpdateFlags(Update::Force);
+ cur.screenUpdateFlags(Update::Force);
}
}
--
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs