From 31c7ccd4b3a8f75358ff29e96da8a1e6ac30bb9d Mon Sep 17 00:00:00 2001 From: Juergen Spitzmueller Date: Sun, 30 Sep 2012 18:36:22 +0200 Subject: [PATCH] Trigger preview when inserting preview inset on selection --- src/Text3.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Text3.cpp b/src/Text3.cpp index 78d74293d0..b114cf242e 100644 --- a/src/Text3.cpp +++ b/src/Text3.cpp @@ -294,7 +294,12 @@ static bool doInsertInset(Cursor & cur, Text * text, // Merge multiple paragraphs -- hack while (cur.lastpit() > 0) mergeParagraph(bparams, cur.text()->paragraphs(), 0); + Cursor old = cur; cur.leaveInset(*inset); + if (cmd.action() == LFUN_PREVIEW_INSERT + || cmd.action() == LFUN_IPA_INSERT) + // trigger preview + notifyCursorLeavesOrEnters(old, cur); } } else { cur.leaveInset(*inset); -- 2.39.2