summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2010-08-05 17:24:45 +0000
committerfrosch <frosch@openttd.org>2010-08-05 17:24:45 +0000
commit1cd34128d61fa16f59f36fb38e4090d19bcbb992 (patch)
tree6a22c2be76c9f4852840de38523311905e5c2e05 /src
parentb2f9f1f1eb110706747e7c783ba0cef26be26b1a (diff)
downloadopenttd-1cd34128d61fa16f59f36fb38e4090d19bcbb992.tar.xz
(svn r20382) -Codechange: Hide default airport layoutname if there is only one layout.
Diffstat (limited to 'src')
-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;