summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/company_cmd.cpp7
-rw-r--r--src/graph_gui.cpp2
2 files changed, 8 insertions, 1 deletions
diff --git a/src/company_cmd.cpp b/src/company_cmd.cpp
index ba52c61eb..673d1c1fa 100644
--- a/src/company_cmd.cpp
+++ b/src/company_cmd.cpp
@@ -969,6 +969,13 @@ CommandCost CmdSetCompanyColour(TileIndex tile, DoCommandFlag flags, uint32 p1,
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
index 9b43dba56..de1479461 100644
--- a/src/graph_gui.cpp
+++ b/src/graph_gui.cpp
@@ -528,7 +528,7 @@ public:
virtual void OnInvalidateData(int data)
{
- this->OnTick();
+ this->UpdateStatistics(true);
}
/**