Fix for SQL text file for editdata upon reload. (#8947)

* set dirty for editdata to false (prevent backup)

* small wording change

* Temporary fix for issue

* using proper fix

* Used editInputData onDidChangeDirty

* Moved all code to editDataInput

* Implemented fix from notebooks into editdata.

* Fix for unregistering copy service

* Fix in QueryEditorService

* add handling in case of changes made while editing

* Small optimization, removed setdirty in sql check

* moved onDidChangeDirty to EditDataInput

* some text changes

* small fix for consistency in slickColorTheme
This commit is contained in:
Alex Ma
2020-01-29 13:03:27 -08:00
committed by GitHub
parent 89554e5c14
commit a5a8c9761e
3 changed files with 14 additions and 10 deletions

View File

@@ -57,9 +57,14 @@ export class EditDataInput extends EditorInput implements IConnectableInput {
this._refreshButtonEnabled = false;
this._useQueryFilter = false;
// re-emit sql editor events through this editor if it exists
// re-emit sql editor events through this editor if it exists.
// also set dirty status to false to prevent rerendering.
if (this._sql) {
this._register(this._sql.onDidChangeDirty(() => this._onDidChangeDirty.fire()));
this._register(this._sql.onDidChangeDirty(async () => {
const model = await this._sql.resolve();
model.setDirty(false);
this._onDidChangeDirty.fire();
}));
}
//TODO determine is this is a table or a view