Codechange: Use parameters, which should be used.

This commit is contained in:
frosch
2023-09-16 23:25:17 +02:00
committed by frosch
parent b6c8f301be
commit b5885295f0
13 changed files with 67 additions and 41 deletions

View File

@@ -563,10 +563,11 @@ public:
void OnDropdownSelect(int widget, int index) override
{
assert(widget == WID_AP_CLASS_DROPDOWN);
_selected_airport_class = (AirportClassID)index;
this->vscroll->SetCount(AirportClass::Get(_selected_airport_class)->GetSpecCount());
this->SelectFirstAvailableAirport(false);
if (widget == WID_AP_CLASS_DROPDOWN) {
_selected_airport_class = (AirportClassID)index;
this->vscroll->SetCount(AirportClass::Get(_selected_airport_class)->GetSpecCount());
this->SelectFirstAvailableAirport(false);
}
}
void OnRealtimeTick([[maybe_unused]] uint delta_ms) override