forked from qt-creator/qt-creator
EditorManager: Introduce flag to not switch to design mode
Change-Id: I004c00e9f9dd61cc5495790b8e83dd857b404193 Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
This commit is contained in:
@@ -1006,7 +1006,7 @@ IEditor *EditorManagerPrivate::activateEditor(EditorView *view, IEditor *editor,
|
|||||||
setCurrentEditor(editor, (flags & EditorManager::IgnoreNavigationHistory));
|
setCurrentEditor(editor, (flags & EditorManager::IgnoreNavigationHistory));
|
||||||
if (!(flags & EditorManager::DoNotMakeVisible)) {
|
if (!(flags & EditorManager::DoNotMakeVisible)) {
|
||||||
// switch to design mode?
|
// switch to design mode?
|
||||||
if (editor->isDesignModePreferred()) {
|
if (!(flags & EditorManager::DoNotSwitchToDesignMode) && editor->isDesignModePreferred()) {
|
||||||
ModeManager::activateMode(Core::Constants::MODE_DESIGN);
|
ModeManager::activateMode(Core::Constants::MODE_DESIGN);
|
||||||
ModeManager::setFocusToCurrentMode();
|
ModeManager::setFocusToCurrentMode();
|
||||||
} else {
|
} else {
|
||||||
|
@@ -106,7 +106,8 @@ public:
|
|||||||
IgnoreNavigationHistory = 2,
|
IgnoreNavigationHistory = 2,
|
||||||
DoNotMakeVisible = 4,
|
DoNotMakeVisible = 4,
|
||||||
CanContainLineNumber = 8,
|
CanContainLineNumber = 8,
|
||||||
OpenInOtherSplit = 16
|
OpenInOtherSplit = 16,
|
||||||
|
DoNotSwitchToDesignMode = 32
|
||||||
};
|
};
|
||||||
Q_DECLARE_FLAGS(OpenEditorFlags, OpenEditorFlag)
|
Q_DECLARE_FLAGS(OpenEditorFlags, OpenEditorFlag)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user