Fix spurious kernel selection dialog on notebook creation (#7258)

* Fix spurious kernel selection dialog on notebook creation

* fix snapshots
This commit is contained in:
Jeremy Tuloup 2024-02-13 16:09:02 +01:00 committed by GitHub
parent 9348f1f2ed
commit b8ec7e4a8e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 4 additions and 2 deletions

View File

@ -58,8 +58,10 @@ const opener: JupyterFrontEndPlugin<IDocumentWidgetOpener> = {
widgetName.includes('Notebook')
) {
// make sure to save the notebook before opening it in a new tab
// so the kernel info is saved
await widget.context.save();
// so the kernel info is saved (if created from the New dropdown)
if (widget.context.sessionContext.kernelPreference.name) {
await widget.context.save();
}
route = 'notebooks';
}
// append ?factory only if it's not the default

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.5 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.9 KiB

After

Width:  |  Height:  |  Size: 18 KiB