From bde1ebaaea85e460f0cba7240af06e714b387acb Mon Sep 17 00:00:00 2001 From: dt Date: Fri, 3 Sep 2010 11:57:46 +0200 Subject: Remove EditorManager::ensureEditorManagerVisible() The function always switched to Edit Mode, which was the cause for several bugs. Since openEditor() already does switch to the right mode, the function is not really needed. The following actions now respect the prefered mode of the editor: "f file"-locator The Open Documents list Editor history navigation --- src/plugins/cpptools/cpptoolsplugin.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/plugins/cpptools/cpptoolsplugin.cpp') diff --git a/src/plugins/cpptools/cpptoolsplugin.cpp b/src/plugins/cpptools/cpptoolsplugin.cpp index 1595fd231c..90d234560b 100644 --- a/src/plugins/cpptools/cpptoolsplugin.cpp +++ b/src/plugins/cpptools/cpptoolsplugin.cpp @@ -170,10 +170,8 @@ void CppToolsPlugin::switchHeaderSource() Core::EditorManager *editorManager = Core::EditorManager::instance(); Core::IEditor *editor = editorManager->currentEditor(); QString otherFile = correspondingHeaderOrSource(editor->file()->fileName()); - if (!otherFile.isEmpty()) { + if (!otherFile.isEmpty()) editorManager->openEditor(otherFile); - editorManager->ensureEditorManagerVisible(); - } } QFileInfo CppToolsPlugin::findFile(const QDir &dir, const QString &name, -- cgit v1.2.1