summaryrefslogtreecommitdiff
path: root/src/plugins/texteditor/snippets/snippeteditor.cpp
diff options
context:
space:
mode:
authorLeandro Melo <leandro.melo@nokia.com>2010-11-22 15:09:27 +0100
committerLeandro Melo <leandro.melo@nokia.com>2010-12-08 17:22:10 +0100
commit4a8bdaf8435a57ba1ea31378b9e7ccc86b1aeee0 (patch)
tree31fa29779d074442244bd4c9ab6844b24a513735 /src/plugins/texteditor/snippets/snippeteditor.cpp
parent44ffd76e8b60e3dcd0741372132b07a8f6fd8225 (diff)
downloadqt-creator-4a8bdaf8435a57ba1ea31378b9e7ccc86b1aeee0.tar.gz
Snippets: Do not update content on window deactivation
Diffstat (limited to 'src/plugins/texteditor/snippets/snippeteditor.cpp')
-rw-r--r--src/plugins/texteditor/snippets/snippeteditor.cpp4
1 files 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 <texteditor/normalindenter.h>
#include <QtGui/QTextDocument>
+#include <QtGui/QFocusEvent>
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();
}