1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-18 12:09:10 +00:00

Fix: Build button text when train purchase window using "Engines" filter

This commit is contained in:
Jonathan G Rennison
2024-01-11 23:00:07 +00:00
parent 94d31864b3
commit 61ed1452ed

View File

@@ -1142,7 +1142,7 @@ struct BuildVehicleWindow : Window {
{
NWidgetCore *widget = this->GetWidget<NWidgetCore>(WID_BV_BUILD);
bool refit = this->sel_engine != INVALID_ENGINE && this->cargo_filter_criteria != CargoFilterCriteria::CF_ANY && this->cargo_filter_criteria != CargoFilterCriteria::CF_NONE;
bool refit = this->sel_engine != INVALID_ENGINE && this->cargo_filter_criteria != CargoFilterCriteria::CF_ANY && this->cargo_filter_criteria != CargoFilterCriteria::CF_NONE && this->cargo_filter_criteria != CargoFilterCriteria::CF_ENGINES;
if (refit) refit = Engine::Get(this->sel_engine)->GetDefaultCargoType() != this->cargo_filter_criteria;
if (refit) {