(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.

This commit is contained in:
peter1138 2009-03-22 21:56:40 +00:00
parent 6567a29e18
commit 216a8eaac6
1 changed files with 3 additions and 2 deletions

View File

@ -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);