From a481d2dc1a011da95778bb8fed803e8c5bf9b22e Mon Sep 17 00:00:00 2001 From: Phillip Andrews Date: Mon, 6 May 2019 14:53:20 -0500 Subject: [PATCH] Make sure pointers are set before GUI windows are brought up This most noticiably fixes an issue when resting in a bed while levitating. --- apps/openmw/mwgui/windowmanagerimp.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/openmw/mwgui/windowmanagerimp.cpp b/apps/openmw/mwgui/windowmanagerimp.cpp index 1b271dfd5..b35b3c92c 100644 --- a/apps/openmw/mwgui/windowmanagerimp.cpp +++ b/apps/openmw/mwgui/windowmanagerimp.cpp @@ -1268,6 +1268,8 @@ namespace MWGui if (mode==GM_Inventory && mAllowed==GW_None) return; + for (WindowBase* window : mGuiModeStates[mode].mWindows) + window->setPtr(arg); if (mGuiModes.empty() || mGuiModes.back() != mode) { // If this mode already exists somewhere in the stack, just bring it to the front. @@ -1286,8 +1288,6 @@ namespace MWGui mGuiModeStates[mode].update(true); playSound(mGuiModeStates[mode].mOpenSound); } - for (WindowBase* window : mGuiModeStates[mode].mWindows) - window->setPtr(arg); mKeyboardNavigation->restoreFocus(mode);