summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2010-01-07 11:54:01 +0000
committerrubidium <rubidium@openttd.org>2010-01-07 11:54:01 +0000
commit175db8d613f528ea266044be2605ca79f9c30e76 (patch)
treec08f124222726a1dcb556ce5c0c57b368240aa01 /src
parent882b23d3ee663c40d332d6fa457d9d2a26b0f945 (diff)
downloadopenttd-175db8d613f528ea266044be2605ca79f9c30e76.tar.xz
(svn r18750) -Fix [FS#3492]: the cargo payment button states weren't properly set on opening the window
Diffstat (limited to 'src')
-rw-r--r--src/graph_gui.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/graph_gui.cpp b/src/graph_gui.cpp
index a8e0d22ab..fca74b3b7 100644
--- a/src/graph_gui.cpp
+++ b/src/graph_gui.cpp
@@ -822,6 +822,13 @@ struct PaymentRatesGraphWindow : BaseGraphWindow {
this->OnHundredthTick();
this->InitNested(desc, window_number);
+
+ int i = 0;
+ const CargoSpec *cs;
+ FOR_ALL_CARGOSPECS(cs) {
+ this->SetWidgetLoweredState(CPW_CARGO_FIRST + i, !HasBit(_legend_excluded_cargo, i));
+ i++;
+ }
}
virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)