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

Only close quick keys-related modals when the menu is closed

This commit is contained in:
Alexei Kotov 2022-07-25 01:00:07 +03:00
parent 80a2ef29ad
commit ae4df2e038
3 changed files with 13 additions and 6 deletions

View File

@ -123,6 +123,18 @@ namespace MWGui
}
}
void QuickKeysMenu::onClose()
{
WindowBase::onClose();
if (mAssignDialog)
mAssignDialog->setVisible(false);
if (mItemSelectionDialog)
mItemSelectionDialog->setVisible(false);
if (mMagicSelectionDialog)
mMagicSelectionDialog->setVisible(false);
}
void QuickKeysMenu::unassign(keyData* key)
{
key->button->clearUserStrings();

View File

@ -33,6 +33,7 @@ namespace MWGui
void onAssignMagic (const std::string& spellId);
void onAssignMagicCancel ();
void onOpen() override;
void onClose() override;
void activateQuickKey(int index);
void updateActivatedQuickKey();

View File

@ -479,12 +479,6 @@ namespace MWInput
{
if (MWBase::Environment::get().getWindowManager()->getMode () == MWGui::GM_QuickKeysMenu)
{
//Handle any open Modal windows
while (MyGUI::InputManager::getInstance().isModalAny())
{
MWBase::Environment::get().getWindowManager()->exitCurrentModal();
}
//And handle the actual main window
MWBase::Environment::get().getWindowManager()->exitCurrentGuiMode();
return;
}