Fix map-mode viewports not updating when changing company and land colours

pull/206/head
Jonathan G Rennison 4 years ago
parent e6edcaf333
commit c4b09e4780

@ -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) {

@ -909,6 +909,9 @@ static bool RedrawSmallmap(int32 p1)
BuildLandLegend();
BuildOwnerLegend();
SetWindowClassesDirty(WC_SMALLMAP);
extern void MarkAllViewportMapLandscapesDirty();
MarkAllViewportMapLandscapesDirty();
return true;
}

Loading…
Cancel
Save