summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/graph_gui.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/graph_gui.cpp b/src/graph_gui.cpp
index fca74b3b7..4867ffa61 100644
--- a/src/graph_gui.cpp
+++ b/src/graph_gui.cpp
@@ -826,7 +826,7 @@ struct PaymentRatesGraphWindow : BaseGraphWindow {
int i = 0;
const CargoSpec *cs;
FOR_ALL_CARGOSPECS(cs) {
- this->SetWidgetLoweredState(CPW_CARGO_FIRST + i, !HasBit(_legend_excluded_cargo, i));
+ this->SetWidgetLoweredState(CPW_CARGO_FIRST + cs->Index(), !HasBit(_legend_excluded_cargo, i));
i++;
}
}