From: Juergen Spitzmueller Date: Sun, 30 Sep 2012 16:36:22 +0000 (+0200) Subject: Trigger preview when inserting preview inset on selection X-Git-Tag: 2.0.6~248 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=abc8c6567f877f561bcace9ca093c15b3f53d5c1;p=features.git Trigger preview when inserting preview inset on selection (cherry picked from commit 31c7ccd4b3a8f75358ff29e96da8a1e6ac30bb9d) --- 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