提交 8932a57a 编写于 作者: R rebornix

destory notebook document only when the editor input is destoried.

上级 b2770856
......@@ -243,13 +243,6 @@ export class NotebookEditor extends BaseEditor implements INotebookEditor {
}
this.list?.splice(0, this.list?.length);
if (this.notebookViewModel && !this.notebookViewModel.isDirty()) {
this.notebookService.destoryNotebookDocument(this.notebookViewModel.viewType!, this.notebookViewModel!.notebookDocument);
this.notebookViewModel.dispose();
this.notebookViewModel = undefined;
}
super.onHide();
}
......
......@@ -149,4 +149,12 @@ export class NotebookEditorInput extends EditorInput {
}
return false;
}
dispose() {
if (this.textModel) {
this.notebookService.destoryNotebookDocument(this.textModel!.notebook.viewType, this.textModel!.notebook);
}
super.dispose();
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册