From d6ce23aba7717777f67397691fe9f764053ccf8a Mon Sep 17 00:00:00 2001 From: Evil Eye Date: Thu, 11 Sep 2025 17:03:06 +0200 Subject: [PATCH] Properly account for map tile visibility --- apps/openmw/mwgui/mapwindow.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/openmw/mwgui/mapwindow.cpp b/apps/openmw/mwgui/mapwindow.cpp index 788b6517ec..ab35f3e25c 100644 --- a/apps/openmw/mwgui/mapwindow.cpp +++ b/apps/openmw/mwgui/mapwindow.cpp @@ -603,7 +603,7 @@ namespace MWGui bool needRedraw = false; for (MapEntry& entry : mMaps) { - if (widgetCropped(entry.mMapWidget, mLocalMap)) + if (!entry.mMapWidget->getVisible() || widgetCropped(entry.mMapWidget, mLocalMap)) continue; if (!entry.mMapTexture) @@ -748,6 +748,8 @@ namespace MWGui const auto size = MyGUI::IntSize(std::ceil(mapWidgetSize), std::ceil(mapWidgetSize)); for (auto& entry : mMaps) { + if (!entry.mMapWidget->getVisible()) + continue; const auto position = getPosition(entry.mCellX, entry.mCellY, 0, 0); entry.mMapWidget->setCoord({ position, size }); entry.mFogWidget->setCoord({ position, size }); @@ -1377,8 +1379,7 @@ namespace MWGui NoDrop::setAlpha(alpha); // can't allow showing map with partial transparency, as the fog of war will also go transparent // and reveal parts of the map you shouldn't be able to see - for (MapEntry& entry : mMaps) - entry.mMapWidget->setVisible(alpha == 1); + mLocalMap->setVisible(alpha == 1); } void MapWindow::customMarkerCreated(MyGUI::Widget* marker)