summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/airport_gui.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/airport_gui.cpp b/src/airport_gui.cpp
index 4ab064007..d76ee392c 100644
--- a/src/airport_gui.cpp
+++ b/src/airport_gui.cpp
@@ -257,12 +257,16 @@ public:
break;
case BAIRW_LAYOUT_NUM:
- SetDParam(0, STR_STATION_BUILD_AIRPORT_LAYOUT_NAME);
- SetDParam(1, _selected_airport_layout + 1);
+ SetDParam(0, STR_EMPTY);
if (_selected_airport_index != -1) {
const AirportSpec *as = GetAirportSpecFromClass(_selected_airport_class, _selected_airport_index);
StringID string = GetAirportTextCallback(as, _selected_airport_layout, CBID_AIRPORT_LAYOUT_NAME);
- if (string != STR_UNDEFINED) SetDParam(0, string);
+ if (string != STR_UNDEFINED) {
+ SetDParam(0, string);
+ } else if (as->num_table > 1) {
+ SetDParam(0, STR_STATION_BUILD_AIRPORT_LAYOUT_NAME);
+ SetDParam(1, _selected_airport_layout + 1);
+ }
}
break;