提交 c5c0989c 编写于 作者: R rebornix

stop relayout if the list is disposed or cell is deleted.

上级 1cbc2f2e
......@@ -793,6 +793,10 @@ export class NotebookEditorWidget extends Disposable implements INotebookEditor
}
let relayout = (cell: ICellViewModel, height: number) => {
if (this._isDisposed) {
return;
}
this.list?.updateElementHeight2(cell, height);
};
......@@ -1014,6 +1018,10 @@ export class NotebookEditorWidget extends Disposable implements INotebookEditor
return false;
}
if (this.pendingLayouts.has(cell)) {
this.pendingLayouts.get(cell)!.dispose();
}
const index = this.notebookViewModel!.getCellIndex(cell);
this.notebookViewModel!.deleteCell(index, true);
return true;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册