Changeset - r28171:e85140df8759
[Not reviewed]
master
0 1 0
Peter Nelson - 12 months ago 2023-11-23 22:46:22
peter1138@openttd.org
Fix 7cfcf65: Check if last-remembered build vehicle cargo filter is valid. (#11486)

This can be invalid when switching between games with different cargoes loaded.
1 file changed with 1 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/build_vehicle_gui.cpp
Show inline comments
 
@@ -1285,6 +1285,7 @@ struct BuildVehicleWindow : Window {
 
	{
 
		/* Set the last cargo filter criteria. */
 
		this->cargo_filter_criteria = _engine_sort_last_cargo_criteria[this->vehicle_type];
 
		if (this->cargo_filter_criteria < NUM_CARGO && !HasBit(_standard_cargo_mask, this->cargo_filter_criteria)) this->cargo_filter_criteria = CF_ANY;
 

	
 
		this->eng_list.SetFilterFuncs(_filter_funcs);
 
		this->eng_list.SetFilterState(this->cargo_filter_criteria != CF_ANY);
0 comments (0 inline, 0 general)