From 97108bdeeaa3387586521f32ea2cd0e81780d2a5 Mon Sep 17 00:00:00 2001 From: Amir Omidi Date: Wed, 15 Apr 2020 13:56:12 -0700 Subject: [PATCH] Stop executing the same code three times (#9835) * Stop executing the same code three times * Remove one more extra call --- .../services/connection/browser/connectionDialogService.ts | 2 -- .../services/connection/browser/connectionDialogWidget.ts | 1 - 2 files changed, 3 deletions(-) diff --git a/src/sql/workbench/services/connection/browser/connectionDialogService.ts b/src/sql/workbench/services/connection/browser/connectionDialogService.ts index 15d3711e3f..2e7b73086a 100644 --- a/src/sql/workbench/services/connection/browser/connectionDialogService.ts +++ b/src/sql/workbench/services/connection/browser/connectionDialogService.ts @@ -423,7 +423,6 @@ export class ConnectionDialogService implements IConnectionDialogService { this._params = params; this._inputModel = model; return new Promise((resolve, reject) => { - this.updateModelServerCapabilities(model); // If connecting from a query editor set "save connection" to false if (params && (params.input && params.connectionType === ConnectionType.editor || params.connectionType === ConnectionType.temporary)) { @@ -455,7 +454,6 @@ export class ConnectionDialogService implements IConnectionDialogService { this._connectionDialog.render(); } this._connectionDialog.newConnectionParams = params; - this._connectionDialog.updateProvider(this._providerNameToDisplayNameMap[this._currentProviderType]); const recentConnections: ConnectionProfile[] = this._connectionManagementService.getRecentConnections(params.providers); await this._connectionDialog.open(recentConnections.length > 0); diff --git a/src/sql/workbench/services/connection/browser/connectionDialogWidget.ts b/src/sql/workbench/services/connection/browser/connectionDialogWidget.ts index ae8acd83a5..cb72c40ff9 100644 --- a/src/sql/workbench/services/connection/browser/connectionDialogWidget.ts +++ b/src/sql/workbench/services/connection/browser/connectionDialogWidget.ts @@ -277,7 +277,6 @@ export class ConnectionDialogWidget extends Modal { // Show connection form based on server type DOM.clearNode(this._connectionUIContainer); this._onShowUiComponent.fire({ selectedProviderDisplayName: selectedProviderDisplayName, container: this._connectionUIContainer }); - this.initDialog(); } private connect(element?: IConnectionProfile): void {