mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
fix wizard page name and step getting announced when pages are added and removed (#13362)
This commit is contained in:
@@ -138,13 +138,13 @@ export class WizardModal extends Modal {
|
|||||||
this._wizard.onPageAdded(page => {
|
this._wizard.onPageAdded(page => {
|
||||||
this.registerPage(page);
|
this.registerPage(page);
|
||||||
this.updatePageNumbers();
|
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 => {
|
this._wizard.onPageRemoved(page => {
|
||||||
let dialogPane = this._dialogPanes.get(page);
|
let dialogPane = this._dialogPanes.get(page);
|
||||||
this._dialogPanes.delete(page);
|
this._dialogPanes.delete(page);
|
||||||
this.updatePageNumbers();
|
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();
|
dialogPane.dispose();
|
||||||
});
|
});
|
||||||
this.updatePageNumbers();
|
this.updatePageNumbers();
|
||||||
@@ -173,7 +173,7 @@ export class WizardModal extends Modal {
|
|||||||
page.onUpdate(() => this.setButtonsForPage(this._wizard.currentPage));
|
page.onUpdate(() => this.setButtonsForPage(this._wizard.currentPage));
|
||||||
}
|
}
|
||||||
|
|
||||||
public async showPage(index: number, validate: boolean = true, focus: boolean = false): Promise<void> {
|
public async showPage(index: number, validate: boolean = true, focus: boolean = false, readHeader: boolean = true): Promise<void> {
|
||||||
let pageToShow = this._wizard.pages[index];
|
let pageToShow = this._wizard.pages[index];
|
||||||
if (!pageToShow) {
|
if (!pageToShow) {
|
||||||
this.done(validate).catch(err => onUnexpectedError(err));
|
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}`);
|
status(`${dialogPaneToShow.pageNumberDisplayText} ${dialogPaneToShow.title}`);
|
||||||
}
|
}
|
||||||
this.setButtonsForPage(index);
|
this.setButtonsForPage(index);
|
||||||
|
|||||||
Reference in New Issue
Block a user