Don't access the stacklayout directly

Bug: T310867
Change-Id: I95cbdee26ead46c2d8803ddb3a9e06304f793407
This commit is contained in:
WMDE-Fisch 2022-07-06 09:48:55 +02:00
parent 479732f516
commit a0c0465d67
3 changed files with 11 additions and 2 deletions

View file

@ -74,7 +74,7 @@ ve.ui.MWTemplateDialog.prototype.getReadyProcess = function ( data ) {
this.bookletLayout.focus();
}
this.bookletLayout.stackLayout.getItems().forEach( function ( page ) {
this.bookletLayout.getPagesOrdered().forEach( function ( page ) {
if ( page instanceof ve.ui.MWParameterPage ) {
page.updateSize();
}

View file

@ -586,7 +586,7 @@ ve.ui.MWTransclusionDialog.prototype.onWindowResize = function () {
if ( this.transclusionModel ) {
this.autoExpandSidebar();
this.bookletLayout.stackLayout.getItems().forEach( function ( page ) {
this.bookletLayout.getPagesOrdered().forEach( function ( page ) {
if ( page instanceof ve.ui.MWParameterPage ) {
page.updateSize();
}

View file

@ -208,6 +208,15 @@ ve.ui.MWTwoPaneTransclusionDialogLayout.prototype.getOutlineControls = function
return this.outlineControlsWidget;
};
/**
* Get the list of pages on the stack ordered by appearance.
*
* @return {OO.ui.PageLayout[]}
*/
ve.ui.MWTwoPaneTransclusionDialogLayout.prototype.getPagesOrdered = function () {
return this.stackLayout.getItems();
};
/**
* Get a page by its symbolic name.
*