From 4acbcc760619333dca9c10e4ece1cc3052248b22 Mon Sep 17 00:00:00 2001 From: dt <qtc-committer@nokia.com> Date: Wed, 4 Feb 2009 16:23:43 +0100 Subject: [PATCH] Fixes: Prevent setCurrentEditor(0) if in fact we still have an editor. Task: - RevBy: - AutoTest: - Details: - --- src/plugins/coreplugin/editormanager/editormanager.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/plugins/coreplugin/editormanager/editormanager.cpp b/src/plugins/coreplugin/editormanager/editormanager.cpp index 26d64fc240c..fc33aa5e99c 100644 --- a/src/plugins/coreplugin/editormanager/editormanager.cpp +++ b/src/plugins/coreplugin/editormanager/editormanager.cpp @@ -462,6 +462,7 @@ bool EditorManager::unregisterEditor(IEditor *editor) return false; } + void EditorManager::updateCurrentEditorAndGroup(IContext *context) { if (debugEditorManager) @@ -470,7 +471,8 @@ void EditorManager::updateCurrentEditorAndGroup(IContext *context) IEditor *editor = context ? qobject_cast<IEditor*>(context) : 0; if (groupContext) { m_d->m_splitter->setCurrentGroup(groupContext->editorGroup()); - setCurrentEditor(0); + if (groupContext->editorGroup()->editorCount() == 0) + setCurrentEditor(0); updateActions(); } else if (editor) { setCurrentEditor(editor); -- GitLab