summaryrefslogtreecommitdiff
path: root/src/company_cmd.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2013-05-19 14:43:23 +0000
committerrubidium <rubidium@openttd.org>2013-05-19 14:43:23 +0000
commit50ae992b47f581d8a50892942438bfe7e3f62141 (patch)
treecd479cffb7344bc8409550dd7af21e6a32460481 /src/company_cmd.cpp
parent163dfdd34afe8020a207b8f0a1b58e29ce082c41 (diff)
downloadopenttd-50ae992b47f581d8a50892942438bfe7e3f62141.tar.xz
(svn r25263) -Add: legend for linkgraph overlay (fonsinchen)
Diffstat (limited to 'src/company_cmd.cpp')
-rw-r--r--src/company_cmd.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/company_cmd.cpp b/src/company_cmd.cpp
index 690058734..589076b21 100644
--- a/src/company_cmd.cpp
+++ b/src/company_cmd.cpp
@@ -82,6 +82,7 @@ void Company::PostDestructor(size_t index)
InvalidateWindowData(WC_GRAPH_LEGEND, 0, (int)index);
InvalidateWindowData(WC_PERFORMANCE_DETAIL, 0, (int)index);
InvalidateWindowData(WC_COMPANY_LEAGUE, 0, 0);
+ InvalidateWindowData(WC_LINKGRAPH_LEGEND, 0);
/* If the currently shown error message has this company in it, then close it. */
InvalidateWindowData(WC_ERRMSG, 0);
}
@@ -559,6 +560,7 @@ Company *DoStartupNewCompany(bool is_ai, CompanyID company = INVALID_COMPANY)
SetWindowDirty(WC_GRAPH_LEGEND, 0);
SetWindowClassesDirty(WC_CLIENT_LIST_POPUP);
SetWindowDirty(WC_CLIENT_LIST, 0);
+ InvalidateWindowData(WC_LINKGRAPH_LEGEND, 0);
BuildOwnerLegend();
InvalidateWindowData(WC_SMALLMAP, 0, 1);
@@ -1052,6 +1054,7 @@ CommandCost CmdSetCompanyColour(TileIndex tile, DoCommandFlag flags, uint32 p1,
InvalidateWindowData(WC_DELIVERED_CARGO, 0);
InvalidateWindowData(WC_PERFORMANCE_HISTORY, 0);
InvalidateWindowData(WC_COMPANY_VALUE, 0);
+ InvalidateWindowData(WC_LINKGRAPH_LEGEND, 0);
/* The smallmap owner view also stores the company colours. */
BuildOwnerLegend();
InvalidateWindowData(WC_SMALLMAP, 0, 1);