diff options
author | Eike Ziller <eike.ziller@digia.com> | 2013-05-31 12:52:53 +0200 |
---|---|---|
committer | Eike Ziller <eike.ziller@digia.com> | 2013-06-05 09:43:14 +0200 |
commit | 7c8db79817ed436176f6055b5c6f8ccf6df16c4c (patch) | |
tree | 28c65055a97c872468055db6e96fb51f70e83f1d /src/plugins/texteditor/refactoringchanges.cpp | |
parent | f99ce422b475c000e1bbdadf13da232dd54d9cca (diff) |
Switch less often to edit mode
This change
* Removes IMode::type, ModeManager::activateModeType, and
IEditor::preferredModeType, and adds IEditor::isDesignModePreferred
instead
* Adapts the mode switching code in EditorManager to handle multiple
windows, for example switching to edit mode should only happen if
the editor/view is in the main window. Otherwise the editor window
should be raised and focused
* Renames EditorManager::NoActivate --> DoNotChangeCurrentEditor
* Reverts the EditorManager::ModeSwitch logic to switch mode or
make the current editor visible by default, introducing
DoNotMakeVisible flag instead
* Fixes a few instances where EditorManager::ModeSwitch should have been
used
One non-trivial problem left: If you open a .ui file and switch to an
external editor window, edit mode is activated, because the current
editor no longer is a .ui file, which means that the design mode gets
deactivated.
Change-Id: I76c5c2391eb4090143b778fb103acff3a5a1ff41
Reviewed-by: David Schulz <david.schulz@digia.com>
Diffstat (limited to 'src/plugins/texteditor/refactoringchanges.cpp')
-rw-r--r-- | src/plugins/texteditor/refactoringchanges.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/texteditor/refactoringchanges.cpp b/src/plugins/texteditor/refactoringchanges.cpp index 8ca3a3cc8d7..e8b73f582a1 100644 --- a/src/plugins/texteditor/refactoringchanges.cpp +++ b/src/plugins/texteditor/refactoringchanges.cpp @@ -136,7 +136,7 @@ BaseTextEditorWidget *RefactoringChanges::openEditor(const QString &fileName, bo { Core::EditorManager::OpenEditorFlags flags = Core::EditorManager::IgnoreNavigationHistory; if (!activate) - flags |= Core::EditorManager::NoActivate; + flags |= Core::EditorManager::DoNotChangeCurrentEditor; if (line != -1) { // openEditorAt uses a 1-based line and a 0-based column! column -= 1; |