From 4a8bdaf8435a57ba1ea31378b9e7ccc86b1aeee0 Mon Sep 17 00:00:00 2001 From: Leandro Melo Date: Mon, 22 Nov 2010 15:09:27 +0100 Subject: [PATCH] Snippets: Do not update content on window deactivation --- src/plugins/texteditor/snippets/snippeteditor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/texteditor/snippets/snippeteditor.cpp b/src/plugins/texteditor/snippets/snippeteditor.cpp index 08a208dafa..96e979a800 100644 --- a/src/plugins/texteditor/snippets/snippeteditor.cpp +++ b/src/plugins/texteditor/snippets/snippeteditor.cpp @@ -34,6 +34,7 @@ #include #include +#include using namespace TextEditor; @@ -68,8 +69,7 @@ void SnippetEditor::setSyntaxHighlighter(TextEditor::SyntaxHighlighter *highligh void SnippetEditor::focusOutEvent(QFocusEvent *event) { - Q_UNUSED(event); - if (document()->isModified()) + if (event->reason() != Qt::ActiveWindowFocusReason && document()->isModified()) emit snippetContentChanged(); } -- 2.11.0