From f0dde491bee0d77c8e67530c6353307ab455f420 Mon Sep 17 00:00:00 2001 From: Anthony Dresser Date: Thu, 12 Dec 2019 13:18:33 -0800 Subject: [PATCH] fix edit data close (#8657) --- .../contrib/editData/browser/editDataEditor.ts | 4 ---- .../contrib/editData/browser/editDataInput.ts | 13 ++++--------- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/src/sql/workbench/contrib/editData/browser/editDataEditor.ts b/src/sql/workbench/contrib/editData/browser/editDataEditor.ts index 05eb44a1e8..f2196d45b3 100644 --- a/src/sql/workbench/contrib/editData/browser/editDataEditor.ts +++ b/src/sql/workbench/contrib/editData/browser/editDataEditor.ts @@ -121,10 +121,6 @@ export class EditDataEditor extends BaseEditor { super.clearInput(); } - public close(): void { - this.editDataInput.close(); - } - /** * Called to create the editor in the parent element. */ diff --git a/src/sql/workbench/contrib/editData/browser/editDataInput.ts b/src/sql/workbench/contrib/editData/browser/editDataInput.ts index 14d11d3eac..b71b3b3c55 100644 --- a/src/sql/workbench/contrib/editData/browser/editDataInput.ts +++ b/src/sql/workbench/contrib/editData/browser/editDataInput.ts @@ -202,6 +202,10 @@ export class EditDataInput extends EditorInput implements IConnectableInput { } public dispose(): void { + // Dispose our edit session then disconnect our input + this._queryModelService.disposeEdit(this.uri).then(() => { + return this._connectionManagementService.disconnectEditor(this, true); + }); this._queryModelService.disposeQuery(this.uri); this._sql.dispose(); this._results.dispose(); @@ -209,15 +213,6 @@ export class EditDataInput extends EditorInput implements IConnectableInput { super.dispose(); } - public close(): void { - // Dispose our edit session then disconnect our input - this._queryModelService.disposeEdit(this.uri).then(() => { - return this._connectionManagementService.disconnectEditor(this, true); - }).then(() => { - this.dispose(); - }); - } - public get tabColor(): string { return this._connectionManagementService.getTabColorForUri(this.uri); }