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>
This commit is contained in:
Finn Brudal
2014-09-26 11:54:11 +02:00
committed by Orgad Shaneh
parent 60eacb7790
commit 540f5677e8

View File

@@ -243,8 +243,9 @@ static void addFileInfo(const QString &fileName, IDocument *document, bool isLin
watcher = d->linkWatcher(); watcher = d->linkWatcher();
else else
watcher = d->fileWatcher(); watcher = d->fileWatcher();
if (!watcher->files().contains(fileName)) if (watcher->files().contains(fileName))
watcher->addPath(fileName); watcher->removePath(fileName);
watcher->addPath(fileName);
d->m_states[fileName].lastUpdatedState.insert(document, state); d->m_states[fileName].lastUpdatedState.insert(document, state);
} }