summaryrefslogtreecommitdiff
path: root/src/plugins/cpptools/cpptoolseditorsupport.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/cpptools/cpptoolseditorsupport.cpp')
-rw-r--r--src/plugins/cpptools/cpptoolseditorsupport.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/cpptools/cpptoolseditorsupport.cpp b/src/plugins/cpptools/cpptoolseditorsupport.cpp
index 3e1619117c..66d2f8adce 100644
--- a/src/plugins/cpptools/cpptoolseditorsupport.cpp
+++ b/src/plugins/cpptools/cpptoolseditorsupport.cpp
@@ -260,7 +260,7 @@ CppCompletionAssistProvider *CppEditorSupport::completionAssistProvider() const
QSharedPointer<SnapshotUpdater> CppEditorSupport::snapshotUpdater()
{
QSharedPointer<SnapshotUpdater> updater = m_snapshotUpdater;
- if (!updater) {
+ if (!updater || updater->fileInEditor() != fileName()) {
updater = QSharedPointer<SnapshotUpdater>(new SnapshotUpdater(fileName()));
m_snapshotUpdater = updater;