1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-29 15:14:33 +01:00

Codechange: Use window parent association for dropdowns.

This replaces the separate window class and number properties, and
allows the window system to close dropdowns automatically.
This commit is contained in:
Peter Nelson
2023-06-02 14:27:06 +01:00
committed by Loïc Guilloux
parent 2d8d9c49c4
commit 81e5cd23e0
8 changed files with 22 additions and 39 deletions

View File

@@ -1965,7 +1965,7 @@ public:
this->SortVehicleList();
if (this->vehicles.size() == 0 && this->IsWidgetLowered(WID_VL_MANAGE_VEHICLES_DROPDOWN)) {
HideDropDownMenu(this);
this->CloseChildWindows(WC_DROPDOWN_MENU);
}
/* Hide the widgets that we will not use in this window