Fix text filter in dual-pane purchase window with GRF custom names

This commit is contained in:
Jonathan G Rennison
2024-05-04 11:40:45 +01:00
parent 6dab30f928
commit 126173a839

View File

@@ -2574,7 +2574,8 @@ struct BuildVehicleWindowTrainAdvanced final : BuildVehicleWindowBase {
/* Filter engine name */ /* Filter engine name */
state.string_filter.ResetState(); state.string_filter.ResetState();
state.string_filter.AddLine(GetString(e->info.string_id)); SetDParam(0, PackEngineNameDParam(e->index, EngineNameContext::PurchaseList));
state.string_filter.AddLine(GetString(STR_ENGINE_NAME));
/* Filter NewGRF extra text */ /* Filter NewGRF extra text */
auto text = GetNewGRFAdditionalText(e->index); auto text = GetNewGRFAdditionalText(e->index);