Commit 89aa5e6d authored by Kai Koehne's avatar Kai Koehne
Browse files

Added 'NoModeSwitch' flag to EditorManager::activateEditor

This allows a different mode to activate an editor without necessarily
switching to the text/debug mode. Used in Bauhaus.

Reviewed-by: con
parent 9a442ce7
......@@ -904,8 +904,10 @@ Core::IEditor *EditorManager::activateEditor(Core::Internal::EditorView *view, C
if (!(flags & NoActivate)) {
setCurrentEditor(editor, (flags & IgnoreNavigationHistory));
ensureEditorManagerVisible();
editor->widget()->setFocus();
if (!(flags & NoModeSwitch))
ensureEditorManagerVisible();
if (isVisible())
editor->widget()->setFocus();
}
return editor;
}
......
......@@ -106,7 +106,8 @@ public:
enum OpenEditorFlag {
NoActivate = 1,
IgnoreNavigationHistory = 2
IgnoreNavigationHistory = 2,
NoModeSwitch = 4
};
Q_DECLARE_FLAGS(OpenEditorFlags, OpenEditorFlag)
......
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