1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-03-16 16:20:53 +00:00

Merge branch 'onclose' into 'master'

Don't reset temporarily hidden container window

Closes #5658

See merge request OpenMW/openmw!363
This commit is contained in:
psi29a 2020-10-22 07:11:31 +00:00
commit 916c3bed98

View File

@ -163,6 +163,10 @@ namespace MWGui
{
WindowBase::onClose();
// Make sure the window was actually closed and not temporarily hidden.
if (MWBase::Environment::get().getWindowManager()->containsMode(GM_Container))
return;
if (mModel)
mModel->onClose();
@ -185,6 +189,7 @@ namespace MWGui
// transfer everything into the player's inventory
ItemModel* playerModel = MWBase::Environment::get().getWindowManager()->getInventoryWindow()->getModel();
assert(mModel);
mModel->update();
// unequip all items to avoid unequipping/reequipping