diff options
author | Eike Ziller <eike.ziller@digia.com> | 2014-06-03 15:06:16 +0200 |
---|---|---|
committer | Eike Ziller <eike.ziller@digia.com> | 2014-06-04 10:41:58 +0200 |
commit | 6c473db09772c4626e046fd692f53d55ecb275da (patch) | |
tree | c8c97ab9debd20a4408ba99fb41e2fe454d36e29 /src/plugins/coreplugin/documentmanager.cpp | |
parent | d455f5f6dcc1be1d2346bb5c112c96ddbfe47ce5 (diff) | |
download | qt-creator-6c473db09772c4626e046fd692f53d55ecb275da.tar.gz |
Fix setting DocumentManager::currentFile when clicking into split
This broke when introducing delayed setting of the currentEditor when
the context changes. Simply move the logic from the document manager to
the editor manager, where it arguably belongs to anyway, and also set
the currentFile delayed in that case.
Task-number: QTCREATORBUG-12264
Change-Id: I67ee3f9a02e62cfa67671629c956a4290361cba8
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Reviewed-by: David Schulz <david.schulz@digia.com>
Diffstat (limited to 'src/plugins/coreplugin/documentmanager.cpp')
-rw-r--r-- | src/plugins/coreplugin/documentmanager.cpp | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/src/plugins/coreplugin/documentmanager.cpp b/src/plugins/coreplugin/documentmanager.cpp index 7e68576cc1..384e9f4070 100644 --- a/src/plugins/coreplugin/documentmanager.cpp +++ b/src/plugins/coreplugin/documentmanager.cpp @@ -216,8 +216,6 @@ DocumentManager::DocumentManager(QObject *parent) { d = new DocumentManagerPrivate; m_instance = this; - connect(ICore::instance(), SIGNAL(contextChanged(QList<Core::IContext*>,Core::Context)), - this, SLOT(syncWithEditor(QList<Core::IContext*>))); qApp->installEventFilter(this); readSettings(); @@ -1129,22 +1127,6 @@ void DocumentManager::checkForReload() // dump(); } -void DocumentManager::syncWithEditor(const QList<Core::IContext *> &context) -{ - if (context.isEmpty()) - return; - - Core::IEditor *editor = Core::EditorManager::currentEditor(); - if (!editor || editor->document()->isTemporary()) - return; - foreach (IContext *c, context) { - if (editor->widget() == c->widget()) { - setCurrentFile(editor->document()->filePath()); - break; - } - } -} - /*! Adds the \a fileName to the list of recent files. Associates the file to be reopened with the editor that has the specified \a editorId, if possible. |