From 3728df83239306587750739d323605bebe5b4005 Mon Sep 17 00:00:00 2001 From: peter1138 Date: Wed, 11 Feb 2009 18:10:12 +0000 Subject: (svn r15448) -Codechange: Don't show rail types in selection drop downs if they have no label. --- src/autoreplace_gui.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/autoreplace_gui.cpp') diff --git a/src/autoreplace_gui.cpp b/src/autoreplace_gui.cpp index 4c6ace490..ba60f74c3 100644 --- a/src/autoreplace_gui.cpp +++ b/src/autoreplace_gui.cpp @@ -347,7 +347,8 @@ public: DropDownList *list = new DropDownList(); for (RailType rt = RAILTYPE_BEGIN; rt != RAILTYPE_END; rt++) { const RailtypeInfo *rti = GetRailTypeInfo(rt); - + /* Skip rail type if it has no label */ + if (rti->label == 0) continue; list->push_back(new DropDownListStringItem(rti->strings.replace_text, rt, !HasBit(c->avail_railtypes, rt))); } ShowDropDownList(this, list, sel_railtype, RVW_WIDGET_TRAIN_RAILTYPE_DROPDOWN); -- cgit v1.2.3-70-g09d2