Fix cargo selection in charts

This commit is contained in:
dP
2022-08-24 18:53:36 +03:00
parent 9e839320a6
commit 3ff1560efe

View File

@@ -839,15 +839,8 @@ struct ExcludingCargoBaseGraphWindow : BaseGraphWindow {
}
bool UpdateExcludedCargo() {
uint64 new_excluded_cargo = 0;
int i = 0;
for (const CargoSpec *cs : _sorted_standard_cargo_specs) {
if (HasBit(_legend_excluded_cargo, cs->Index())) SetBit(new_excluded_cargo, i);
i++;
}
if (this->excluded_cargo == new_excluded_cargo) return false;
this->excluded_cargo = new_excluded_cargo;
if (this->excluded_cargo == _legend_excluded_cargo) return false;
this->excluded_cargo = _legend_excluded_cargo;
return true;
}