summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2009-03-22 21:56:40 +0000
committerpeter1138 <peter1138@openttd.org>2009-03-22 21:56:40 +0000
commit216a8eaac655bf9528184bdcdca837aef9181767 (patch)
tree1bec697e01f9f44543c39c749f1fc8eff1ca4433 /src
parent6567a29e182d6de528bbfc57258ec38c03a0385f (diff)
downloadopenttd-216a8eaac655bf9528184bdcdca837aef9181767.tar.xz
(svn r15821) -Fix (r15813): Wrong widget selection prevented drop down label showing in vehicle list windows. Instead of drawing the label ourselves we can set the dropdown's data property to the string to draw.
Diffstat (limited to 'src')
-rw-r--r--src/vehicle_gui.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/vehicle_gui.cpp b/src/vehicle_gui.cpp
index f951f58b4..f0b4c8b4a 100644
--- a/src/vehicle_gui.cpp
+++ b/src/vehicle_gui.cpp
@@ -1041,10 +1041,11 @@ struct VehicleListWindow : public BaseVehicleListWindow {
VLW_WIDGET_START_ALL,
WIDGET_LIST_END);
+ /* Set text of sort by dropdown widget. */
+ this->widget[VLW_WIDGET_SORT_BY_PULLDOWN].data = this->vehicle_sorter_names[this->vehicles.SortType()];
+
this->DrawWidgets();
- /* draw sorting criteria string */
- DrawString(85, this->widget[VLW_WIDGET_SORT_ORDER].right, 15, this->vehicle_sorter_names[this->vehicles.SortType()], TC_BLACK);
/* draw arrow pointing up/down for ascending/descending sorting */
this->DrawSortButtonState(VLW_WIDGET_SORT_ORDER, this->vehicles.IsDescSortOrder() ? SBS_DOWN : SBS_UP);