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.1.0beta1~1480^2 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=31c7ccd4b3a8f75358ff29e96da8a1e6ac30bb9d;p=features.git Trigger preview when inserting preview inset on selection --- 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);