Add Window method to change window class

Use in BuildRoadStationWindow
This commit is contained in:
Jonathan G Rennison
2023-06-05 18:05:17 +01:00
parent 6215e326fd
commit 665a4ca55b
3 changed files with 11 additions and 3 deletions

View File

@@ -1320,7 +1320,8 @@ public:
this->FinishInitNested(TRANSPORT_ROAD);
this->window_class = (rs == ROADSTOP_BUS) ? WC_BUS_STATION : WC_TRUCK_STATION;
this->ChangeWindowClass((rs == ROADSTOP_BUS) ? WC_BUS_STATION : WC_TRUCK_STATION);
if (!newstops || _roadstop_gui_settings.roadstop_class >= (int)RoadStopClass::GetClassCount()) {
/* There's no new stops available or the list has reduced in size.
* Now, set the default road stops as selected. */