1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-23 04:04:09 +01:00

Codefix: [UI] Incorrect initialisation order for rail/road toolbars. (#12843)

The toolbar state was set after the widget tree is created, during which toolbar state is needed.
This commit is contained in:
Peter Nelson
2024-07-04 22:04:41 +01:00
committed by GitHub
parent 2dc0a33eb7
commit 4976a0140e
2 changed files with 4 additions and 2 deletions

View File

@@ -349,8 +349,9 @@ struct BuildRoadToolbarWindow : Window {
BuildRoadToolbarWindow(WindowDesc &desc, WindowNumber window_number) : Window(desc)
{
this->Initialize(_cur_roadtype);
this->InitNested(window_number);
this->CreateNestedTree();
this->SetupRoadToolbar();
this->FinishInitNested(window_number);
this->SetWidgetDisabledState(WID_ROT_REMOVE, true);
if (RoadTypeIsRoad(this->roadtype)) {