Commit fb206c3f authored by mae's avatar mae
Browse files

make inplace activation the default editor activation, unless the

view has been specified. This allows to use the open editors view
as tabbar replacement also in split mode.
parent f679e80c
......@@ -750,12 +750,12 @@ void EditorManager::activateEditor(IEditor *editor, OpenEditorFlags flags)
if (splitterOrView && splitterOrView->splitter())
splitterOrView = 0; // safety if currentView gets out of sync
setCurrentView(0);
if (!editor)
return;
if (editor && (flags & ActivateInPlace)) {
SplitterOrView *place = m_d->m_splitter->findView(editor);
if (place && !place->isSplitter()) {
splitterOrView = place;
}
SplitterOrView *place = m_d->m_splitter->findView(editor);
if (place && !place->isSplitter()) {
splitterOrView = place;
}
......
......@@ -104,9 +104,7 @@ public:
enum OpenEditorFlag {
NoActivate = 1,
IgnoreNavigationHistory = 2,
ActivateInPlace = 4
IgnoreNavigationHistory = 2
};
Q_DECLARE_FLAGS(OpenEditorFlags, OpenEditorFlag)
......
......@@ -235,7 +235,7 @@ void OpenEditorsWindow::selectEditor(QTreeWidgetItem *item)
if (item)
editor = item->data(0, Qt::UserRole).value<IEditor*>();
if (editor)
EditorManager::instance()->activateEditor(editor, EditorManager::ActivateInPlace);
EditorManager::instance()->activateEditor(editor);
}
void OpenEditorsWindow::editorClicked(QTreeWidgetItem *item)
......
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