fix flatfile and dacfx wizard not defaulting to selected connection when launched from command palette (#4344)

This commit is contained in:
kisantia
2019-03-08 09:19:03 -08:00
committed by GitHub
parent 496243fbc7
commit bcfbe5a284
2 changed files with 11 additions and 0 deletions

View File

@@ -91,8 +91,16 @@ export class DataTierApplicationWizard {
if (!this.connection) {
// @TODO: remove cast once azdata update complete - karlb 3/1/2019
this.connection = <azdata.connection.ConnectionProfile><any>await azdata.connection.openConnectionDialog();
// don't open the wizard if connection dialog is cancelled
if (!this.connection) {
vscode.window.showErrorMessage(localize('dacfx.needConnection', 'Please connect to a server before using this wizard.'));
return;
}
}
this.model.serverId = this.connection.connectionId;
this.wizard = azdata.window.createWizard('Data-tier Application Wizard');
let selectOperationWizardPage = azdata.window.createWizardPage(localize('dacFx.selectOperationPageName', 'Select an Operation'));
let deployConfigWizardPage = azdata.window.createWizardPage(localize('dacFx.deployConfigPageName', 'Select Deploy Dacpac Settings'));