From 9ead331741fb4ccd1a2615047739e5c03b9030d6 Mon Sep 17 00:00:00 2001 From: scrawl <720642+scrawl@users.noreply.github.com> Date: Sat, 23 Sep 2017 14:42:25 +0200 Subject: [PATCH] Fix pinned windows showing in other GUI modes --- apps/openmw/mwgui/windowmanagerimp.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/apps/openmw/mwgui/windowmanagerimp.cpp b/apps/openmw/mwgui/windowmanagerimp.cpp index 6306ef81a..8266e3e8d 100644 --- a/apps/openmw/mwgui/windowmanagerimp.cpp +++ b/apps/openmw/mwgui/windowmanagerimp.cpp @@ -613,6 +613,8 @@ namespace MWGui setSpellVisibility((mAllowed & GW_Magic) && (!mSpellWindow->pinned() || (mForceHidden & GW_Magic))); setHMSVisibility((mAllowed & GW_Stats) && (!mStatsWindow->pinned() || (mForceHidden & GW_Stats))); + mInventoryWindow->setGuiMode(getMode()); + // If in game mode (or interactive messagebox), show the pinned windows if (mGuiModes.empty()) { @@ -622,11 +624,17 @@ namespace MWGui mSpellWindow->setVisible(mSpellWindow->pinned() && !(mForceHidden & GW_Magic) && (mAllowed & GW_Magic)); return; } + else if (getMode() != GM_Inventory) + { + mMap->setVisible(false); + mStatsWindow->setVisible(false); + mSpellWindow->setVisible(false); + mInventoryWindow->setVisible(getMode() == GM_Container || getMode() == GM_Barter); + } GuiMode mode = mGuiModes.back(); mInventoryWindow->setTrading(mode == GM_Barter); - mInventoryWindow->setGuiMode(mode); // For the inventory mode, compute the effective set of windows to show. // This is controlled both by what windows the