Codechange: Remove deferred nested_array initialization path. (#11640)

Having two ways (`FillNestedArray` and `SetupSmallestSize`) to initialize
`Window::nested_array` introduces confusion.

Instead, make `FillNestedArray` the canonical way, always call it, and remove
init_array from `SetupSmallestSize`.
This commit is contained in:
2023-12-29 14:27:04 +00:00
committed by GitHub
parent 11ba951250
commit feb94d233d
9 changed files with 48 additions and 83 deletions

View File

@@ -326,7 +326,7 @@ public:
this->querystrings[WID_SL_SAVE_OSK_TITLE] = &this->filename_editbox;
this->filename_editbox.ok_button = WID_SL_SAVE_GAME;
this->CreateNestedTree(true);
this->CreateNestedTree();
if (this->fop == SLO_LOAD && this->abstract_filetype == FT_SAVEGAME) {
this->GetWidget<NWidgetStacked>(WID_SL_CONTENT_DOWNLOAD_SEL)->SetDisplayedPlane(SZSP_HORIZONTAL);
}