forked from qt-creator/qt-creator
ensure editor is visible
after fetching a codesnippet, we should switch to edit mode and open the editor
This commit is contained in:
@@ -261,7 +261,9 @@ void CodepasterPlugin::finishFetch(const QString &titleDescription,
|
|||||||
if (error) {
|
if (error) {
|
||||||
ICore::instance()->messageManager()->printToOutputPane(content, true);
|
ICore::instance()->messageManager()->printToOutputPane(content, true);
|
||||||
} else {
|
} 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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user