From 1584c8f73372328e05cb95784894a20580ca77dd Mon Sep 17 00:00:00 2001 From: fonsinchen Date: Tue, 18 Jun 2013 19:32:58 +0000 Subject: (svn r25426) -Fix: highlight the right entry in the sorting selector in station view window --- src/station_gui.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/station_gui.cpp b/src/station_gui.cpp index 9e85899d6..67a5d68d8 100644 --- a/src/station_gui.cpp +++ b/src/station_gui.cpp @@ -1913,7 +1913,13 @@ struct StationViewWindow : public Window { } case WID_SV_SORT_BY: { - ShowDropDownMenu(this, _sort_names, this->current_mode, WID_SV_SORT_BY, 0, 0); + /* The initial selection is composed of current mode and + * sorting criteria for columns 1, 2, and 3. Column 0 is always + * sorted by cargo ID. The others can theoretically be sorted + * by different things but there is no UI for that. */ + ShowDropDownMenu(this, _sort_names, + this->current_mode * 2 + (this->sortings[1] == ST_COUNT ? 1 : 0), + WID_SV_SORT_BY, 0, 0); break; } -- cgit v1.2.3-54-g00ecf