summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2010-06-23 14:56:17 +0000
committerrubidium <rubidium@openttd.org>2010-06-23 14:56:17 +0000
commit18e567c168d26ed12a6703edc39c98adf9f6ff23 (patch)
tree9e7b8728ad22fd0726c538f6d7f4c121b0546658
parent52154e097c4f6e0e9d03bad83b933b05b6082d16 (diff)
downloadopenttd-18e567c168d26ed12a6703edc39c98adf9f6ff23.tar.xz
(svn r20014) -Fix [FS#3881]: don't close the sort dropdown in the (original) vehicle list when there are no vehicles. That code is meant for the "actions" dropdown
-rw-r--r--src/vehicle_gui.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/vehicle_gui.cpp b/src/vehicle_gui.cpp
index f43f5b862..7d9e13e4a 100644
--- a/src/vehicle_gui.cpp
+++ b/src/vehicle_gui.cpp
@@ -1114,7 +1114,9 @@ public:
this->BuildVehicleList(this->owner, GB(this->window_number, 16, 16), window_type);
this->SortVehicleList();
- if (this->vehicles.Length() == 0) HideDropDownMenu(this);
+ if (this->vehicles.Length() == 0 && this->IsWidgetLowered(VLW_WIDGET_MANAGE_VEHICLES_DROPDOWN)) {
+ HideDropDownMenu(this);
+ }
/* Hide the widgets that we will not use in this window
* Some windows contains actions only fit for the owner */