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
This commit is contained in:
dt
2010-09-03 11:57:46 +02:00
parent 0e2a7608f2
commit bde1ebaaea
13 changed files with 25 additions and 28 deletions

View File

@@ -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,