Trigger preview when inserting preview inset on selection

(cherry picked from commit 31c7ccd4b3)
This commit is contained in:
Juergen Spitzmueller 2012-09-30 18:36:22 +02:00
parent 7b155bfdb8
commit abc8c6567f
2 changed files with 7 additions and 0 deletions

View File

@ -283,7 +283,12 @@ static bool doInsertInset(Cursor & cur, Text * text,
// Merge multiple paragraphs -- hack // Merge multiple paragraphs -- hack
while (cur.lastpit() > 0) while (cur.lastpit() > 0)
mergeParagraph(bparams, cur.text()->paragraphs(), 0); mergeParagraph(bparams, cur.text()->paragraphs(), 0);
Cursor old = cur;
cur.leaveInset(*inset); cur.leaveInset(*inset);
if (cmd.action() == LFUN_PREVIEW_INSERT
|| cmd.action() == LFUN_IPA_INSERT)
// trigger preview
notifyCursorLeavesOrEnters(old, cur);
} }
} else { } else {
cur.leaveInset(*inset); cur.leaveInset(*inset);

View File

@ -56,6 +56,8 @@ What's new
* USER INTERFACE * USER INTERFACE
- When selecting text and Insert > Preview, immediately display the
preview (bug #8075).
* DOCUMENTATION AND LOCALIZATION * DOCUMENTATION AND LOCALIZATION