Changeset - r27980:5d92d1f2c688
[Not reviewed]
master
0 1 0
merni-ns - 14 months ago 2023-10-03 10:58:44
66267867+merni-ns@users.noreply.github.com
Fix #11261: Set number of items correctly when choosing available airport set (#11344)
1 file changed with 2 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/airport_gui.cpp
Show inline comments
 
@@ -544,13 +544,14 @@ public:
 
		}
 
		if (change_class) {
 
			/* 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++) {
 
				AirportClass *apclass = AirportClass::Get(j);
 
				for (uint i = 0; i < apclass->GetSpecCount(); i++) {
 
					const AirportSpec *as = apclass->GetSpec(i);
 
					if (as->IsAvailable()) {
 
						_selected_airport_class = j;
 
						this->vscroll->SetCount(apclass->GetSpecCount());
 
						this->SelectOtherAirport(i);
 
						return;
 
					}
0 comments (0 inline, 0 general)