Prevent shortcuts from applying to closed windows

This commit is contained in:
WerWolv 2020-11-29 01:18:12 +01:00
parent 3276ad9979
commit 8a4b663890
1 changed files with 4 additions and 2 deletions

View File

@ -160,8 +160,10 @@ namespace hex {
if (auto &[key, mods] = Window::s_currShortcut; key != -1) { if (auto &[key, mods] = Window::s_currShortcut; key != -1) {
for (auto &view : this->m_views) { for (auto &view : this->m_views) {
if (view->handleShortcut(key, mods)) if (view->getWindowOpenState()) {
break; if (view->handleShortcut(key, mods))
break;
}
} }
Window::s_currShortcut = { -1, -1 }; Window::s_currShortcut = { -1, -1 };