From 216a8eaac655bf9528184bdcdca837aef9181767 Mon Sep 17 00:00:00 2001 From: peter1138 Date: Sun, 22 Mar 2009 21:56:40 +0000 Subject: [PATCH] (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. --- src/vehicle_gui.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/vehicle_gui.cpp b/src/vehicle_gui.cpp index f951f58b40..f0b4c8b4aa 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);