1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-23 20:24:12 +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

@@ -438,8 +438,9 @@ struct BuildRailToolbarWindow : Window {
BuildRailToolbarWindow(WindowDesc &desc, RailType railtype) : Window(desc)
{
this->InitNested(TRANSPORT_RAIL);
this->CreateNestedTree();
this->SetupRailToolbar(railtype);
this->FinishInitNested(TRANSPORT_RAIL);
this->DisableWidget(WID_RAT_REMOVE);
this->OnInvalidateData();
this->last_user_action = INVALID_WID_RAT;