mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-13 02:52:37 +00:00
This commit is contained in:
parent
82c8720814
commit
077b08bbfa
@ -544,13 +544,14 @@ public:
|
|||||||
}
|
}
|
||||||
if (change_class) {
|
if (change_class) {
|
||||||
/* If that fails, select the first available airport
|
/* If that fails, select the first available airport
|
||||||
* from a random class. */
|
* from the first class where airports are available. */
|
||||||
for (AirportClassID j = APC_BEGIN; j < APC_MAX; j++) {
|
for (AirportClassID j = APC_BEGIN; j < APC_MAX; j++) {
|
||||||
AirportClass *apclass = AirportClass::Get(j);
|
AirportClass *apclass = AirportClass::Get(j);
|
||||||
for (uint i = 0; i < apclass->GetSpecCount(); i++) {
|
for (uint i = 0; i < apclass->GetSpecCount(); i++) {
|
||||||
const AirportSpec *as = apclass->GetSpec(i);
|
const AirportSpec *as = apclass->GetSpec(i);
|
||||||
if (as->IsAvailable()) {
|
if (as->IsAvailable()) {
|
||||||
_selected_airport_class = j;
|
_selected_airport_class = j;
|
||||||
|
this->vscroll->SetCount(apclass->GetSpecCount());
|
||||||
this->SelectOtherAirport(i);
|
this->SelectOtherAirport(i);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user