forked from qt-creator/qt-creator
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
This commit is contained in:
@@ -904,7 +904,9 @@ Core::IEditor *EditorManager::activateEditor(Core::Internal::EditorView *view, C
|
||||
|
||||
if (!(flags & NoActivate)) {
|
||||
setCurrentEditor(editor, (flags & IgnoreNavigationHistory));
|
||||
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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user