summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
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;
}