fix: Shortcuts not getting dispatched to menu inherit view correctly

This commit is contained in:
WerWolv
2026-03-03 13:46:16 +01:00
parent 380b1dbce3
commit a2fc9325c9

View File

@@ -367,7 +367,11 @@ namespace hex {
if (keyCode != 0)
s_prevShortcut = Shortcut(pressedShortcut.getKeys());
runShortcut(pressedShortcut, currentView);
const auto inheritedShortcutsView = currentView->getMenuItemInheritView();
if (!runShortcut(pressedShortcut, currentView)) {
if (inheritedShortcutsView != nullptr)
runShortcut(pressedShortcut, inheritedShortcutsView);
}
}
void ShortcutManager::processGlobals(bool ctrl, bool alt, bool shift, bool super, u32 keyCode) {