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