# HG changeset patch # User terkhen # Date 1271095089 0 # Node ID 895f760ad105961a53499f7155a32c5b9ff53eef # Parent baf0e12ad2b4ef05b7dfd0d8b579bcb25ec0e023 (svn r19615) -Fix [FS#3763]: Company related graphs weren't updated correctly after changing the company colour. diff --git a/src/company_cmd.cpp b/src/company_cmd.cpp --- a/src/company_cmd.cpp +++ b/src/company_cmd.cpp @@ -969,6 +969,13 @@ ResetVehicleColourMap(); MarkWholeScreenDirty(); + /* All graph related to companies use the company colour. */ + 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); + /* Company colour data is indirectly cached. */ Vehicle *v; FOR_ALL_VEHICLES(v) { diff --git a/src/graph_gui.cpp b/src/graph_gui.cpp --- a/src/graph_gui.cpp +++ b/src/graph_gui.cpp @@ -528,7 +528,7 @@ virtual void OnInvalidateData(int data) { - this->OnTick(); + this->UpdateStatistics(true); } /**