From c4b09e47803da188ff7c9400ff3a62068c3d449c Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Fri, 20 Nov 2020 17:47:12 +0000 Subject: [PATCH] Fix map-mode viewports not updating when changing company and land colours --- src/company_cmd.cpp | 3 +++ src/settings.cpp | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/company_cmd.cpp b/src/company_cmd.cpp index 12c98f42b9..60214402cf 100644 --- a/src/company_cmd.cpp +++ b/src/company_cmd.cpp @@ -1052,6 +1052,9 @@ CommandCost CmdSetCompanyColour(TileIndex tile, DoCommandFlag flags, uint32 p1, BuildOwnerLegend(); InvalidateWindowData(WC_SMALLMAP, 0, 1); + extern void MarkAllViewportMapLandscapesDirty(); + MarkAllViewportMapLandscapesDirty(); + /* Company colour data is indirectly cached. */ for (Vehicle *v : Vehicle::Iterate()) { if (v->owner == _current_company) { diff --git a/src/settings.cpp b/src/settings.cpp index 4eb0f01750..6600730e52 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -909,6 +909,9 @@ static bool RedrawSmallmap(int32 p1) BuildLandLegend(); BuildOwnerLegend(); SetWindowClassesDirty(WC_SMALLMAP); + + extern void MarkAllViewportMapLandscapesDirty(); + MarkAllViewportMapLandscapesDirty(); return true; }