Show running state in cell toolbar immediately when cell is run (#4484)

This commit is contained in:
Chris LaFreniere
2019-03-13 20:04:46 -07:00
committed by GitHub
parent 0131746919
commit 11f0ca371b

View File

@@ -212,12 +212,12 @@ export class CellModel implements ICellModel {
// TODO update source based on editor component contents
let content = this.source;
if (content) {
this.fireExecutionStateChanged();
let future = await kernel.requestExecute({
code: content,
stop_on_error: true
}, false);
this.setFuture(future as FutureInternal);
this.fireExecutionStateChanged();
// For now, await future completion. Later we should just track and handle cancellation based on model notifications
let result: nb.IExecuteReplyMsg = <nb.IExecuteReplyMsg><any>await future.done;
if (result && result.content) {