Commit 4a8bdaf8 authored by Leandro Melo's avatar Leandro Melo

Snippets: Do not update content on window deactivation

parent 44ffd76e
......@@ -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();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment