Commit 4acbcc76 authored by dt's avatar dt
Browse files

Fixes: Prevent setCurrentEditor(0) if in fact we still have an

editor.

Task:     -
RevBy:    -
AutoTest: -
Details:  -
parent e1401807
...@@ -462,6 +462,7 @@ bool EditorManager::unregisterEditor(IEditor *editor) ...@@ -462,6 +462,7 @@ bool EditorManager::unregisterEditor(IEditor *editor)
return false; return false;
} }
void EditorManager::updateCurrentEditorAndGroup(IContext *context) void EditorManager::updateCurrentEditorAndGroup(IContext *context)
{ {
if (debugEditorManager) if (debugEditorManager)
...@@ -470,7 +471,8 @@ void EditorManager::updateCurrentEditorAndGroup(IContext *context) ...@@ -470,7 +471,8 @@ void EditorManager::updateCurrentEditorAndGroup(IContext *context)
IEditor *editor = context ? qobject_cast<IEditor*>(context) : 0; IEditor *editor = context ? qobject_cast<IEditor*>(context) : 0;
if (groupContext) { if (groupContext) {
m_d->m_splitter->setCurrentGroup(groupContext->editorGroup()); m_d->m_splitter->setCurrentGroup(groupContext->editorGroup());
setCurrentEditor(0); if (groupContext->editorGroup()->editorCount() == 0)
setCurrentEditor(0);
updateActions(); updateActions();
} else if (editor) { } else if (editor) {
setCurrentEditor(editor); setCurrentEditor(editor);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment