diff options
author | Eike Ziller <eike.ziller@digia.com> | 2014-06-13 10:51:51 +0200 |
---|---|---|
committer | Eike Ziller <eike.ziller@digia.com> | 2014-06-13 10:51:51 +0200 |
commit | 2786250c172138c1ece456305264f7b5039b8f2a (patch) | |
tree | dd0a56d98aefe9e1c6a3042b5cbcc37e87bd903b /src/plugins/coreplugin/editormanager/editormanager.cpp | |
parent | e9d433a99a8fa4769df92f9caaaaaec049596c34 (diff) | |
parent | 27cc89eb4a1e157c68793718602416448547de20 (diff) | |
download | qt-creator-2786250c172138c1ece456305264f7b5039b8f2a.tar.gz |
Merge remote-tracking branch 'origin/3.1'
Conflicts:
qtcreator.pri
qtcreator.qbs
src/shared/qbs
Change-Id: Iba59e41db72e2afdf594f1f7003215d7d8d1e6d3
Diffstat (limited to 'src/plugins/coreplugin/editormanager/editormanager.cpp')
-rw-r--r-- | src/plugins/coreplugin/editormanager/editormanager.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/plugins/coreplugin/editormanager/editormanager.cpp b/src/plugins/coreplugin/editormanager/editormanager.cpp index 129054b342..5ddf0b12d2 100644 --- a/src/plugins/coreplugin/editormanager/editormanager.cpp +++ b/src/plugins/coreplugin/editormanager/editormanager.cpp @@ -526,6 +526,8 @@ void EditorManager::handleContextChange(const QList<Core::IContext *> &context) d->m_scheduledCurrentEditor = editor; QTimer::singleShot(0, m_instance, SLOT(setCurrentEditorFromContextChange())); } else { + if (editor && !editor->document()->isTemporary()) + DocumentManager::setCurrentFile(editor->document()->filePath()); updateActions(); } } @@ -1027,6 +1029,9 @@ void EditorManager::setCurrentEditorFromContextChange() IEditor *newCurrent = d->m_scheduledCurrentEditor; d->m_scheduledCurrentEditor = 0; setCurrentEditor(newCurrent); + if (!newCurrent->document()->isTemporary()) + DocumentManager::setCurrentFile(newCurrent->document()->filePath()); + } void EditorManager::closeEditor(Core::IEditor *editor, bool askAboutModifiedEditors) |