From b3669a87959bb5b00953f9ad8a5344c12b0b5074 Mon Sep 17 00:00:00 2001 From: merni-ns <66267867+merni-ns@users.noreply.github.com> Date: Mon, 19 Jun 2023 04:33:32 +0530 Subject: [PATCH] Fix #11026: Use real engine name instead of default name for filtering (#11033) --- src/build_vehicle_gui.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/build_vehicle_gui.cpp b/src/build_vehicle_gui.cpp index a06c6088af..8bbf899901 100644 --- a/src/build_vehicle_gui.cpp +++ b/src/build_vehicle_gui.cpp @@ -1370,7 +1370,8 @@ struct BuildVehicleWindow : Window { /* Filter engine name */ this->string_filter.ResetState(); - this->string_filter.AddLine(GetString(e->info.string_id)); + SetDParam(0, PackEngineNameDParam(e->index, EngineNameContext::PurchaseList)); + this->string_filter.AddLine(GetString(STR_ENGINE_NAME)); /* Filter NewGRF extra text */ auto text = GetNewGRFAdditionalText(e->index);