Set active editor with dirty value before and after save #3411 (#3417)

This commit is contained in:
Raj
2018-12-04 13:21:13 -08:00
committed by GitHub
parent 487531cc52
commit 3091be8f67
2 changed files with 14 additions and 4 deletions

View File

@@ -321,6 +321,9 @@ export class NotebookComponent extends AngularDisposable implements OnInit, OnDe
public async save(): Promise<boolean> {
try {
let saved = await this._model.saveModel();
if (saved) {
this.setDirty(false);
}
return saved;
} catch (err) {
this.notificationService.error(localize('saveFailed', 'Failed to save notebook: {0}', notebookUtils.getErrorMessage(err)));
@@ -329,10 +332,9 @@ export class NotebookComponent extends AngularDisposable implements OnInit, OnDe
}
private setDirty(isDirty: boolean): void {
// TODO reenable handling of isDirty
// if (this.editor) {
// this.editor.isDirty = isDirty;
// }
if(this._notebookParams.input){
this._notebookParams.input.setDirty(isDirty);
}
}
private actionItemProvider(action: Action): IActionItem {