Fix changing smallmap legend not updating viewport maps
This commit is contained in:
@@ -487,8 +487,10 @@ static void NotifyAllViewports(ViewportMapType map_type)
|
|||||||
Window *w;
|
Window *w;
|
||||||
FOR_ALL_WINDOWS_FROM_BACK(w) {
|
FOR_ALL_WINDOWS_FROM_BACK(w) {
|
||||||
if (w->viewport != nullptr)
|
if (w->viewport != nullptr)
|
||||||
if (w->viewport->zoom >= ZOOM_LVL_DRAW_MAP && w->viewport->map_type == map_type)
|
if (w->viewport->zoom >= ZOOM_LVL_DRAW_MAP && w->viewport->map_type == map_type) {
|
||||||
|
ClearViewportLandPixelCache(w->viewport);
|
||||||
w->InvalidateData();
|
w->InvalidateData();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -24,6 +24,7 @@ static const int TILE_HEIGHT_STEP = 50; ///< One Z unit tile height difference i
|
|||||||
void SetSelectionRed(bool);
|
void SetSelectionRed(bool);
|
||||||
|
|
||||||
void ClearViewportCache(Viewport *vp);
|
void ClearViewportCache(Viewport *vp);
|
||||||
|
void ClearViewportLandPixelCache(Viewport *vp);
|
||||||
void ClearViewportCaches();
|
void ClearViewportCaches();
|
||||||
void DeleteWindowViewport(Window *w);
|
void DeleteWindowViewport(Window *w);
|
||||||
void InitializeWindowViewport(Window *w, int x, int y, int width, int height, uint32 follow_flags, ZoomLevel zoom);
|
void InitializeWindowViewport(Window *w, int x, int y, int width, int height, uint32 follow_flags, ZoomLevel zoom);
|
||||||
|
Reference in New Issue
Block a user