|
|
|
@ -2527,8 +2527,8 @@ struct IndustryCargoesWindow : public Window {
|
|
|
|
|
const IndustrySpec *indsp = GetIndustrySpec(it);
|
|
|
|
|
if (!indsp->enabled) continue;
|
|
|
|
|
this->ind_textsize = maxdim(this->ind_textsize, GetStringBoundingBox(indsp->name));
|
|
|
|
|
CargoesField::max_cargoes = std::max<uint>(CargoesField::max_cargoes, std::count_if(indsp->accepts_cargo, endof(indsp->accepts_cargo), IsCargoIDValid));
|
|
|
|
|
CargoesField::max_cargoes = std::max<uint>(CargoesField::max_cargoes, std::count_if(indsp->produced_cargo, endof(indsp->produced_cargo), IsCargoIDValid));
|
|
|
|
|
CargoesField::max_cargoes = std::max<uint>(CargoesField::max_cargoes, std::count_if(indsp->accepts_cargo, endof(indsp->accepts_cargo), IsValidCargoID));
|
|
|
|
|
CargoesField::max_cargoes = std::max<uint>(CargoesField::max_cargoes, std::count_if(indsp->produced_cargo, endof(indsp->produced_cargo), IsValidCargoID));
|
|
|
|
|
}
|
|
|
|
|
d.width = std::max(d.width, this->ind_textsize.width);
|
|
|
|
|
d.height = this->ind_textsize.height;
|
|
|
|
|