1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-07 12:54:00 +00:00

Don't reset temporarily hidden container window

This commit is contained in:
Alexei Dobrohotov 2020-10-22 01:57:23 +03:00
parent 4ae504970f
commit f1b7cd5404

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