commit a206eab879a6b1210520b7f4889040902ff17449
Author: Juergen Spitzmueller <[email protected]>
Date:   Tue Aug 5 11:36:03 2025 +0200

    Fix crash when dissolving Preview or IPA inset (#13207)
    
    This amends 8d4aaaebda
---
 src/insets/InsetIPA.cpp     | 2 +-
 src/insets/InsetPreview.cpp | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/insets/InsetIPA.cpp b/src/insets/InsetIPA.cpp
index 8a26548f95..e13b3ef6e7 100644
--- a/src/insets/InsetIPA.cpp
+++ b/src/insets/InsetIPA.cpp
@@ -82,7 +82,7 @@ void InsetIPA::doDispatch(Cursor & cur, FuncRequest & cmd)
        default:
                bool const has_preview = previewState(&cur.bv());
                InsetText::doDispatch(cur, cmd);
-               if (has_preview != previewState(&cur.bv()))
+               if (&cur.inset() == this && has_preview != 
previewState(&cur.bv()))
                        // 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 3c77dce82d..dabbf5ece2 100644
--- a/src/insets/InsetPreview.cpp
+++ b/src/insets/InsetPreview.cpp
@@ -181,7 +181,7 @@ void InsetPreview::doDispatch(Cursor & cur, FuncRequest & 
cmd)
 {
        bool const has_preview = previewState(&cur.bv());
        InsetText::doDispatch(cur, cmd);
-       if (has_preview != previewState(&cur.bv()))
+       if (&cur.inset() == this && has_preview != previewState(&cur.bv()))
                // FIXME : it should be possible to trigger a SinglePar update
                //   on the parent paragraph.
                cur.screenUpdateFlags(Update::Force);
-- 
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to