mirror of https://github.com/OpenTTD/OpenTTD
Cargo payment graph should now be filtered only by CargoID instead of sorted position.pull/13227/head
parent
c0df898ac5
commit
8dfab2a607
|
@ -1061,13 +1061,7 @@ struct PaymentRatesGraphWindow : BaseGraphWindow {
|
||||||
|
|
||||||
void UpdateExcludedData()
|
void UpdateExcludedData()
|
||||||
{
|
{
|
||||||
this->excluded_data = 0;
|
this->excluded_data = _legend_excluded_cargo_payment_rates;
|
||||||
|
|
||||||
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++;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void UpdateWidgetSize(WidgetID widget, Dimension &size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension &fill, [[maybe_unused]] Dimension &resize) override
|
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: {
|
case WID_GRAPH_DISABLE_CARGOES: {
|
||||||
/* Add all cargoes to the excluded lists. */
|
/* Add all cargoes to the excluded lists. */
|
||||||
int i = 0;
|
|
||||||
for (const CargoSpec *cs : _sorted_standard_cargo_specs) {
|
for (const CargoSpec *cs : _sorted_standard_cargo_specs) {
|
||||||
SetBit(_legend_excluded_cargo_payment_rates, cs->Index());
|
SetBit(_legend_excluded_cargo_payment_rates, cs->Index());
|
||||||
SetBit(this->excluded_data, i);
|
SetBit(this->excluded_data, cs->Index());
|
||||||
i++;
|
|
||||||
}
|
}
|
||||||
this->SetDirty();
|
this->SetDirty();
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue