diff options
author | Leandro Melo <leandro.melo@nokia.com> | 2011-01-14 16:07:47 +0100 |
---|---|---|
committer | Leandro Melo <leandro.melo@nokia.com> | 2011-01-14 16:33:28 +0100 |
commit | 7968853f1af035139b4b9c92a509baca4e7dd17d (patch) | |
tree | 20e203ae0cc5930c3a61d642314189511401788d /src/plugins/texteditor/snippets/snippeteditor.cpp | |
parent | 30b036502ba011739d4a6515675b04162d6aaad7 (diff) | |
download | qt-creator-7968853f1af035139b4b9c92a509baca4e7dd17d.tar.gz |
Snippets: Check for content change on apply
Cannot rely on the focus out event (on Mac) in the
situation where a snippet is added/edited and the
dialog is immediately confirmed.
Reviewed-by: con
Task-number: QTCREATORBUG-3464
Diffstat (limited to 'src/plugins/texteditor/snippets/snippeteditor.cpp')
-rw-r--r-- | src/plugins/texteditor/snippets/snippeteditor.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/texteditor/snippets/snippeteditor.cpp b/src/plugins/texteditor/snippets/snippeteditor.cpp index 53050504df..5e5dffb786 100644 --- a/src/plugins/texteditor/snippets/snippeteditor.cpp +++ b/src/plugins/texteditor/snippets/snippeteditor.cpp @@ -73,8 +73,10 @@ void SnippetEditor::setSyntaxHighlighter(TextEditor::SyntaxHighlighter *highligh void SnippetEditor::focusOutEvent(QFocusEvent *event) { - if (event->reason() != Qt::ActiveWindowFocusReason && document()->isModified()) + if (event->reason() != Qt::ActiveWindowFocusReason && document()->isModified()) { + document()->setModified(false); emit snippetContentChanged(); + } } BaseTextEditorEditable *SnippetEditor::createEditableInterface() |