From abc8c6567f877f561bcace9ca093c15b3f53d5c1 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 (cherry picked from commit 31c7ccd4b3a8f75358ff29e96da8a1e6ac30bb9d) --- src/Text3.cpp | 5 +++++ status.20x | 2 ++ 2 files changed, 7 insertions(+) diff --git a/src/Text3.cpp b/src/Text3.cpp index 50a6d3d12c..58726bf6d7 100644 --- a/src/Text3.cpp +++ b/src/Text3.cpp @@ -283,7 +283,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); diff --git a/status.20x b/status.20x index bf40ef4c33..5780767b59 100644 --- a/status.20x +++ b/status.20x @@ -56,6 +56,8 @@ What's new * USER INTERFACE +- When selecting text and Insert > Preview, immediately display the + preview (bug #8075). * DOCUMENTATION AND LOCALIZATION -- 2.39.5