Commit 8b57492f authored by Eike Ziller's avatar Eike Ziller
Browse files

EditorManager: Introduce flag to not switch to design mode



Change-Id: I004c00e9f9dd61cc5495790b8e83dd857b404193
Reviewed-by: default avatarUlf Hermann <ulf.hermann@theqtcompany.com>
parent 7e1b512f
......@@ -1006,7 +1006,7 @@ IEditor *EditorManagerPrivate::activateEditor(EditorView *view, IEditor *editor,
setCurrentEditor(editor, (flags & EditorManager::IgnoreNavigationHistory));
if (!(flags & EditorManager::DoNotMakeVisible)) {
// switch to design mode?
if (editor->isDesignModePreferred()) {
if (!(flags & EditorManager::DoNotSwitchToDesignMode) && editor->isDesignModePreferred()) {
ModeManager::activateMode(Core::Constants::MODE_DESIGN);
ModeManager::setFocusToCurrentMode();
} else {
......
......@@ -106,7 +106,8 @@ public:
IgnoreNavigationHistory = 2,
DoNotMakeVisible = 4,
CanContainLineNumber = 8,
OpenInOtherSplit = 16
OpenInOtherSplit = 16,
DoNotSwitchToDesignMode = 32
};
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