1
0

Add a fix for inventory that can't be open in some cases

The forceUpdateHoveredElement() forces GUI Environment to drop previously
grabbed elements that are not hovered anymore.
This commit is contained in:
Deve 2023-05-17 00:26:18 +02:00 committed by GitHub
parent cd784ebf81
commit 9c6495b695
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -109,7 +109,17 @@ void GUIModalMenu::quitMenu()
// This removes Environment's grab on us
Environment->removeFocus(this);
m_menumgr->deletingMenu(this);
this->grab();
this->remove();
#if IRRLICHT_VERSION_MAJOR == 1 && IRRLICHT_VERSION_MINOR >= 9
// Force update hovered elements, so that GUI Environment drops previously
// grabbed elements that are not hovered anymore
Environment->forceUpdateHoveredElement();
#endif
this->drop();
#ifdef HAVE_TOUCHSCREENGUI
if (g_touchscreengui && g_touchscreengui->isActive() && m_touchscreen_visible)
g_touchscreengui->show();