]> git.lyx.org Git - features.git/commitdiff
Trigger preview when inserting preview inset on selection
authorJuergen Spitzmueller <spitz@lyx.org>
Sun, 30 Sep 2012 16:36:22 +0000 (18:36 +0200)
committerJuergen Spitzmueller <spitz@lyx.org>
Sun, 11 Nov 2012 10:04:19 +0000 (11:04 +0100)
(cherry picked from commit 31c7ccd4b3a8f75358ff29e96da8a1e6ac30bb9d)

src/Text3.cpp
status.20x

index 50a6d3d12ca0eb91cbfd38a3a1dce8a41948a803..58726bf6d76725526e7b3789791d44f21e8b3429 100644 (file)
@@ -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);
index bf40ef4c33e532216af935dfacfe7f7f04f43ace..5780767b5968a482e0acc4071674a5099547f808 100644 (file)
@@ -56,6 +56,8 @@ What's new
 
 * USER INTERFACE
 
+- When selecting text and Insert > Preview, immediately display the
+  preview (bug #8075).
 
 
 * DOCUMENTATION AND LOCALIZATION