(svn r18750) -Fix [FS#3492]: the cargo payment button states weren't properly set on opening the window

This commit is contained in:
rubidium 2010-01-07 11:54:01 +00:00
parent 882b23d3ee
commit 175db8d613
1 changed files with 7 additions and 0 deletions

View File

@ -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)