summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordt <qtc-committer@nokia.com>2009-02-04 16:23:43 +0100
committerdt <qtc-committer@nokia.com>2009-02-04 16:23:43 +0100
commit4acbcc760619333dca9c10e4ece1cc3052248b22 (patch)
tree753f582ffa393c44baba4871925051b73347ed36
parente14018076da29af265c60de3679519c62fc6f031 (diff)
downloadqt-creator-4acbcc760619333dca9c10e4ece1cc3052248b22.tar.gz
Fixes: Prevent setCurrentEditor(0) if in fact we still have an
editor. Task: - RevBy: - AutoTest: - Details: -
-rw-r--r--src/plugins/coreplugin/editormanager/editormanager.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/coreplugin/editormanager/editormanager.cpp b/src/plugins/coreplugin/editormanager/editormanager.cpp
index 26d64fc240..fc33aa5e99 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);