mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-06 14:27:16 +00:00
Cargo payment graph should now be filtered only by CargoID instead of sorted position.
This commit is contained in:
parent
c0df898ac5
commit
8dfab2a607
@ -1061,13 +1061,7 @@ struct PaymentRatesGraphWindow : BaseGraphWindow {
|
||||
|
||||
void UpdateExcludedData()
|
||||
{
|
||||
this->excluded_data = 0;
|
||||
|
||||
int i = 0;
|
||||
for (const CargoSpec *cs : _sorted_standard_cargo_specs) {
|
||||
if (HasBit(_legend_excluded_cargo_payment_rates, cs->Index())) SetBit(this->excluded_data, i);
|
||||
i++;
|
||||
}
|
||||
this->excluded_data = _legend_excluded_cargo_payment_rates;
|
||||
}
|
||||
|
||||
void UpdateWidgetSize(WidgetID widget, Dimension &size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension &fill, [[maybe_unused]] Dimension &resize) override
|
||||
@ -1141,11 +1135,9 @@ struct PaymentRatesGraphWindow : BaseGraphWindow {
|
||||
|
||||
case WID_GRAPH_DISABLE_CARGOES: {
|
||||
/* Add all cargoes to the excluded lists. */
|
||||
int i = 0;
|
||||
for (const CargoSpec *cs : _sorted_standard_cargo_specs) {
|
||||
SetBit(_legend_excluded_cargo_payment_rates, cs->Index());
|
||||
SetBit(this->excluded_data, i);
|
||||
i++;
|
||||
SetBit(this->excluded_data, cs->Index());
|
||||
}
|
||||
this->SetDirty();
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user