#4331: Set notebook dirty when change 'trusted' (#4569)

This commit is contained in:
Raj
2019-03-18 10:56:04 -07:00
committed by GitHub
parent 0160901060
commit 6d7d485a38
3 changed files with 2 additions and 5 deletions

View File

@@ -11,7 +11,6 @@ import { localize } from 'vs/nls';
import { Event, Emitter } from 'vs/base/common/event';
import { Disposable, IDisposable } from 'vs/base/common/lifecycle';
import { CellModel } from './cell';
import { IClientSession, INotebookModel, IDefaultConnection, INotebookModelOptions, ICellModel, NotebookContentChange, notebookConstants } from './modelInterfaces';
import { NotebookChangeType, CellType } from 'sql/parts/notebook/models/contracts';
import { nbversion } from '../notebookConstants';

View File

@@ -176,7 +176,8 @@ export class NotebookComponent extends AngularDisposable implements OnInit, OnDe
this._model.cells.forEach(cell => {
cell.trustedMode = isTrusted;
});
//TODO: Handle dirty for trust?
//Updates dirty state
this._notebookParams.input && this._notebookParams.input.updateModel();
this.detectChanges();
}

View File

@@ -138,7 +138,6 @@ export class NotebookInput extends EditorInput {
private _parentContainer: HTMLElement;
private readonly _layoutChanged: Emitter<void> = this._register(new Emitter<void>());
private _model: NotebookEditorModel;
private _untitledEditorService: IUntitledEditorService;
private _contentManager: IContentManager;
private _providersLoaded: Promise<void>;
@@ -146,13 +145,11 @@ export class NotebookInput extends EditorInput {
private resource: URI,
private _textInput: UntitledEditorInput,
@ITextModelService private textModelService: ITextModelService,
@IUntitledEditorService untitledEditorService: IUntitledEditorService,
@IInstantiationService private instantiationService: IInstantiationService,
@INotebookService private notebookService: INotebookService,
@IExtensionService private extensionService: IExtensionService
) {
super();
this._untitledEditorService = untitledEditorService;
this.resource = resource;
this._standardKernels = [];
this._providersLoaded = this.assignProviders();