From 50ae992b47f581d8a50892942438bfe7e3f62141 Mon Sep 17 00:00:00 2001 From: rubidium Date: Sun, 19 May 2013 14:43:23 +0000 Subject: (svn r25263) -Add: legend for linkgraph overlay (fonsinchen) --- src/company_cmd.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/company_cmd.cpp') 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); -- cgit v1.2.3-54-g00ecf