1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-31 21:45:33 +00:00

Make sure pointers are set before GUI windows are brought up

This most noticiably fixes an issue when resting in a bed while levitating.
This commit is contained in:
Phillip Andrews 2019-05-06 14:53:20 -05:00
parent f49ca98c8c
commit a481d2dc1a

View file

@ -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);