summaryrefslogtreecommitdiff
path: root/src/company_cmd.cpp
diff options
context:
space:
mode:
authorterkhen <terkhen@openttd.org>2010-04-12 17:58:09 +0000
committerterkhen <terkhen@openttd.org>2010-04-12 17:58:09 +0000
commit7ba4f98ce571814d2d1ec647f4175c4ba1df0643 (patch)
tree2bc9aa125b4be9eebf12acc101ee09752d29b17a /src/company_cmd.cpp
parent0ef33548c20ae9cf73a6e9e850b17137b1453dd3 (diff)
downloadopenttd-7ba4f98ce571814d2d1ec647f4175c4ba1df0643.tar.xz
(svn r19615) -Fix [FS#3763]: Company related graphs weren't updated correctly after changing the company colour.
Diffstat (limited to 'src/company_cmd.cpp')
-rw-r--r--src/company_cmd.cpp7
1 files changed, 7 insertions, 0 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) {