Prevent shortcuts from applying to closed windows
This commit is contained in:
parent
3276ad9979
commit
8a4b663890
@ -160,9 +160,11 @@ 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->getWindowOpenState()) {
|
||||||
if (view->handleShortcut(key, mods))
|
if (view->handleShortcut(key, mods))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Window::s_currShortcut = { -1, -1 };
|
Window::s_currShortcut = { -1, -1 };
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user