ensure editor is visible

after fetching a codesnippet, we should switch to edit mode
and open the editor
This commit is contained in:
Maurice Kalinowski
2009-07-31 11:24:12 +02:00
parent 6a91b63af9
commit 435207a223

View File

@@ -261,7 +261,9 @@ void CodepasterPlugin::finishFetch(const QString &titleDescription,
if (error) {
ICore::instance()->messageManager()->printToOutputPane(content, true);
} else {
EditorManager::instance()->newFile(Core::Constants::K_DEFAULT_TEXT_EDITOR, &title, content);
EditorManager* manager = EditorManager::instance();
IEditor* editor = manager->newFile(Core::Constants::K_DEFAULT_TEXT_EDITOR, &title, content);
manager->activateEditor(editor);
}
}