From abdf5758853bfb928b0cea59eb59b418ee0c9256 Mon Sep 17 00:00:00 2001 From: Kim Santiago <31145923+kisantia@users.noreply.github.com> Date: Thu, 12 Nov 2020 09:44:33 -0800 Subject: [PATCH] fix wizard page name and step getting announced when pages are added and removed (#13362) --- src/sql/workbench/services/dialog/browser/wizardModal.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/sql/workbench/services/dialog/browser/wizardModal.ts b/src/sql/workbench/services/dialog/browser/wizardModal.ts index 901e42ff0b..d194c8576c 100644 --- a/src/sql/workbench/services/dialog/browser/wizardModal.ts +++ b/src/sql/workbench/services/dialog/browser/wizardModal.ts @@ -138,13 +138,13 @@ export class WizardModal extends Modal { this._wizard.onPageAdded(page => { this.registerPage(page); this.updatePageNumbers(); - this.showPage(this._wizard.currentPage, false).catch(err => onUnexpectedError(err)); + this.showPage(this._wizard.currentPage, false, false, false).catch(err => onUnexpectedError(err)); }); this._wizard.onPageRemoved(page => { let dialogPane = this._dialogPanes.get(page); this._dialogPanes.delete(page); this.updatePageNumbers(); - this.showPage(this._wizard.currentPage, false).catch(err => onUnexpectedError(err)); + this.showPage(this._wizard.currentPage, false, false, false).catch(err => onUnexpectedError(err)); dialogPane.dispose(); }); this.updatePageNumbers(); @@ -173,7 +173,7 @@ export class WizardModal extends Modal { page.onUpdate(() => this.setButtonsForPage(this._wizard.currentPage)); } - public async showPage(index: number, validate: boolean = true, focus: boolean = false): Promise { + public async showPage(index: number, validate: boolean = true, focus: boolean = false, readHeader: boolean = true): Promise { let pageToShow = this._wizard.pages[index]; if (!pageToShow) { this.done(validate).catch(err => onUnexpectedError(err)); @@ -194,7 +194,7 @@ export class WizardModal extends Modal { } }); - if (dialogPaneToShow) { + if (dialogPaneToShow && readHeader) { status(`${dialogPaneToShow.pageNumberDisplayText} ${dialogPaneToShow.title}`); } this.setButtonsForPage(index);