diff options
Diffstat (limited to 'src/graph_gui.cpp')
-rw-r--r-- | src/graph_gui.cpp | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/src/graph_gui.cpp b/src/graph_gui.cpp index 186b3bf8a..7023bc95d 100644 --- a/src/graph_gui.cpp +++ b/src/graph_gui.cpp @@ -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(); |