summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfonsinchen <fonsinchen@openttd.org>2013-06-18 19:32:58 +0000
committerfonsinchen <fonsinchen@openttd.org>2013-06-18 19:32:58 +0000
commit1584c8f73372328e05cb95784894a20580ca77dd (patch)
treeb6c1cb3231f551650b8d92046721fc0f4e992cd6 /src
parent854d5e4b784904df03b1faeb6fbbb107dff757e0 (diff)
downloadopenttd-1584c8f73372328e05cb95784894a20580ca77dd.tar.xz
(svn r25426) -Fix: highlight the right entry in the sorting selector in station view window
Diffstat (limited to 'src')
-rw-r--r--src/station_gui.cpp8
1 files changed, 7 insertions, 1 deletions
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;
}