|
@@ -261,7 +261,7 @@ function activateNotebookHandler(app: Application, registry: DocumentRegistry, s
|
|
handler: () => {
|
|
handler: () => {
|
|
if (tracker.activeNotebook) {
|
|
if (tracker.activeNotebook) {
|
|
let nbWidget = tracker.activeNotebook;
|
|
let nbWidget = tracker.activeNotebook;
|
|
- nbWidget.restart();
|
|
|
|
|
|
+ NotebookActions.restart(nbWidget.kernel, nbWidget.node);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -270,7 +270,8 @@ function activateNotebookHandler(app: Application, registry: DocumentRegistry, s
|
|
handler: () => {
|
|
handler: () => {
|
|
if (tracker.activeNotebook) {
|
|
if (tracker.activeNotebook) {
|
|
let nbWidget = tracker.activeNotebook;
|
|
let nbWidget = tracker.activeNotebook;
|
|
- nbWidget.restart().then(result => {
|
|
|
|
|
|
+ let promise = NotebookActions.restart(nbWidget.kernel, nbWidget.node);
|
|
|
|
+ promise.then(result => {
|
|
if (result) {
|
|
if (result) {
|
|
NotebookActions.clearAllOutputs(nbWidget.content);
|
|
NotebookActions.clearAllOutputs(nbWidget.content);
|
|
}
|
|
}
|
|
@@ -283,7 +284,8 @@ function activateNotebookHandler(app: Application, registry: DocumentRegistry, s
|
|
handler: () => {
|
|
handler: () => {
|
|
if (tracker.activeNotebook) {
|
|
if (tracker.activeNotebook) {
|
|
let nbWidget = tracker.activeNotebook;
|
|
let nbWidget = tracker.activeNotebook;
|
|
- nbWidget.restart().then(result => {
|
|
|
|
|
|
+ let promise = NotebookActions.restart(nbWidget.kernel, nbWidget.node);
|
|
|
|
+ promise.then(result => {
|
|
NotebookActions.runAll(nbWidget.content, nbWidget.context.kernel);
|
|
NotebookActions.runAll(nbWidget.content, nbWidget.context.kernel);
|
|
});
|
|
});
|
|
}
|
|
}
|