Fix industry chain window not always updating map-mode viewports

This commit is contained in:
Jonathan G Rennison
2022-05-10 18:29:06 +01:00
parent 5c2fb5c160
commit 8eb0609541
3 changed files with 28 additions and 26 deletions

View File

@@ -2748,16 +2748,7 @@ struct IndustryCargoesWindow : public Window {
{
if (!this->IsWidgetLowered(WID_IC_NOTIFY)) return;
/* Only notify the smallmap window if it exists. In particular, do not
* bring it to the front to prevent messing up any nice layout of the user. */
InvalidateWindowClassesData(WC_SMALLMAP, 0);
/* Notify viewports too. */
for (Window *w : Window::IterateFromBack()) {
if (w->viewport != nullptr)
if (w->viewport->zoom >= ZOOM_LVL_DRAW_MAP && w->viewport->map_type == VPMT_INDUSTRY)
w->InvalidateData();
}
UpdateSmallMapSelectedIndustries();
}
/**