summaryrefslogtreecommitdiff
path: root/src/plugins/coreplugin/documentmanager.cpp
diff options
context:
space:
mode:
authorFinn Brudal <Finn.Brudal@kongsberg.com>2014-09-26 11:54:11 +0200
committerOrgad Shaneh <orgads@gmail.com>2015-06-15 06:59:18 +0000
commit540f5677e83513135e5785890a3167959cb9a370 (patch)
tree8f34c4e317dbf7e0ee9d2af6ea0d8cfff685eb34 /src/plugins/coreplugin/documentmanager.cpp
parent60eacb77909f8bf894c10ed2b6ef490bc3c0f96f (diff)
downloadqt-creator-540f5677e83513135e5785890a3167959cb9a370.tar.gz
Core: Reinitialize change notification after saving
When saving a version controlled file, a new version might be created. Therefore, ensure that the current file version is being monitored. Change-Id: Icad41bc5a443561de0c0e878aa893913dc674173 Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Diffstat (limited to 'src/plugins/coreplugin/documentmanager.cpp')
-rw-r--r--src/plugins/coreplugin/documentmanager.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/coreplugin/documentmanager.cpp b/src/plugins/coreplugin/documentmanager.cpp
index 74b4b650b2..f605f33a44 100644
--- a/src/plugins/coreplugin/documentmanager.cpp
+++ b/src/plugins/coreplugin/documentmanager.cpp
@@ -243,8 +243,9 @@ static void addFileInfo(const QString &fileName, IDocument *document, bool isLin
watcher = d->linkWatcher();
else
watcher = d->fileWatcher();
- if (!watcher->files().contains(fileName))
- watcher->addPath(fileName);
+ if (watcher->files().contains(fileName))
+ watcher->removePath(fileName);
+ watcher->addPath(fileName);
d->m_states[fileName].lastUpdatedState.insert(document, state);
}