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
This commit is contained in:
Leandro Melo
2011-01-14 16:07:47 +01:00
parent 30b036502b
commit 7968853f1a
2 changed files with 6 additions and 1 deletions

View File

@@ -387,6 +387,9 @@ void SnippetsSettingsPagePrivate::apply()
if (settingsChanged())
writeSettings();
if (currentEditor()->document()->isModified())
setSnippetContent();
if (m_snippetsCollectionChanged) {
SnippetsCollection::instance()->synchronize();
m_snippetsCollectionChanged = false;