From d027b705753f1b2a637c87268837d8aa1f59e5aa Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Mon, 5 Jul 2021 20:20:59 +0100 Subject: [PATCH] Fix 5230ff5e: wagon/logo sort and filter saved state mixup --- src/build_vehicle_gui.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/build_vehicle_gui.cpp b/src/build_vehicle_gui.cpp index 10404cee35..d391452461 100644 --- a/src/build_vehicle_gui.cpp +++ b/src/build_vehicle_gui.cpp @@ -2622,7 +2622,7 @@ struct BuildVehicleWindowTrainAdvanced final : BuildVehicleWindowBase { case WID_BV_SORT_DROPDOWN_LOCO: { if (this->loco.sort_criteria != index) { this->loco.sort_criteria = static_cast(index); - _last_sort_criteria_wagon = this->loco.sort_criteria; + _last_sort_criteria_loco = this->loco.sort_criteria; this->loco.eng_list.ForceRebuild(); } break; @@ -2631,7 +2631,7 @@ struct BuildVehicleWindowTrainAdvanced final : BuildVehicleWindowBase { case WID_BV_CARGO_FILTER_DROPDOWN_LOCO: { // Select a cargo filter criteria if (this->loco.cargo_filter_criteria != index) { this->loco.cargo_filter_criteria = static_cast(index); - _last_filter_criteria_wagon = this->loco.cargo_filter[this->loco.cargo_filter_criteria]; + _last_filter_criteria_loco = this->loco.cargo_filter[this->loco.cargo_filter_criteria]; /* deactivate filter if criteria is 'Show All', activate it otherwise */ this->loco.eng_list.SetFilterState(this->loco.cargo_filter[this->loco.cargo_filter_criteria] != CF_ANY); this->loco.eng_list.ForceRebuild();