]> 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, 30 Sep 2012 16:36:22 +0000 (18:36 +0200)
src/Text3.cpp

index 78d74293d05f107dccf3a50cf648db09c21e8e51..b114cf242e5ff8c9e12ea9049f177e62440ced8d 100644 (file)
@@ -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);