forked from qt-creator/qt-creator
EditorManager: Introduce a DoNotRaise EditorManager::OpenEditorFlag
In some situations it might be beneficial to set up the editor as usual but do not raise the application window. This is opt-in, existing behavior is not affected. Task-number: QTCREATORBUG-12769 Change-Id: If9826717bba06283187d10073c02a748b638c3f8 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -1543,6 +1543,7 @@ IEditor *EditorManagerPrivate::activateEditor(EditorView *view, IEditor *editor,
|
|||||||
ModeManager::activateMode(Constants::MODE_EDIT);
|
ModeManager::activateMode(Constants::MODE_EDIT);
|
||||||
}
|
}
|
||||||
editor->widget()->setFocus();
|
editor->widget()->setFocus();
|
||||||
|
if (!(flags & EditorManager::DoNotRaise))
|
||||||
ICore::raiseWindow(editor->widget());
|
ICore::raiseWindow(editor->widget());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -81,7 +81,8 @@ public:
|
|||||||
OpenInOtherSplit = 16,
|
OpenInOtherSplit = 16,
|
||||||
DoNotSwitchToDesignMode = 32,
|
DoNotSwitchToDesignMode = 32,
|
||||||
DoNotSwitchToEditMode = 64,
|
DoNotSwitchToEditMode = 64,
|
||||||
SwitchSplitIfAlreadyVisible = 128
|
SwitchSplitIfAlreadyVisible = 128,
|
||||||
|
DoNotRaise = 256
|
||||||
};
|
};
|
||||||
Q_DECLARE_FLAGS(OpenEditorFlags, OpenEditorFlag)
|
Q_DECLARE_FLAGS(OpenEditorFlags, OpenEditorFlag)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user