mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-16 00:12:51 +00:00
(svn r19574) -Fix: graphs were not properly updated when going toggling keys (i.e. companies)
This commit is contained in:
parent
1fbde179d9
commit
c2945f0bb0
@ -88,11 +88,11 @@ struct GraphLegendWindow : Window {
|
||||
ToggleBit(_legend_excluded_companies, widget - GLW_FIRST_COMPANY);
|
||||
this->ToggleWidgetLoweredState(widget);
|
||||
this->SetDirty();
|
||||
SetWindowDirty(WC_INCOME_GRAPH, 0);
|
||||
SetWindowDirty(WC_OPERATING_PROFIT, 0);
|
||||
SetWindowDirty(WC_DELIVERED_CARGO, 0);
|
||||
SetWindowDirty(WC_PERFORMANCE_HISTORY, 0);
|
||||
SetWindowDirty(WC_COMPANY_VALUE, 0);
|
||||
InvalidateWindowData(WC_INCOME_GRAPH, 0);
|
||||
InvalidateWindowData(WC_OPERATING_PROFIT, 0);
|
||||
InvalidateWindowData(WC_DELIVERED_CARGO, 0);
|
||||
InvalidateWindowData(WC_PERFORMANCE_HISTORY, 0);
|
||||
InvalidateWindowData(WC_COMPANY_VALUE, 0);
|
||||
}
|
||||
|
||||
virtual void OnInvalidateData(int data)
|
||||
@ -526,6 +526,11 @@ public:
|
||||
this->UpdateStatistics(false);
|
||||
}
|
||||
|
||||
virtual void OnInvalidateData(int data)
|
||||
{
|
||||
this->OnTick();
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the statistics.
|
||||
* @param initialize Initialize the data structure.
|
||||
@ -956,6 +961,11 @@ struct PaymentRatesGraphWindow : BaseGraphWindow {
|
||||
/* Override default OnTick */
|
||||
}
|
||||
|
||||
virtual void OnInvalidateData(int data)
|
||||
{
|
||||
this->OnHundredthTick();
|
||||
}
|
||||
|
||||
virtual void OnHundredthTick()
|
||||
{
|
||||
this->UpdateExcludedData();
|
||||
|
Loading…
Reference in New Issue
Block a user