From 540f5677e83513135e5785890a3167959cb9a370 Mon Sep 17 00:00:00 2001 From: Finn Brudal Date: Fri, 26 Sep 2014 11:54:11 +0200 Subject: [PATCH] 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 Reviewed-by: Eike Ziller --- src/plugins/coreplugin/documentmanager.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/plugins/coreplugin/documentmanager.cpp b/src/plugins/coreplugin/documentmanager.cpp index 74b4b650b25..f605f33a44c 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); }