fix: Some shortcuts not working correctly on macOS

This commit is contained in:
WerWolv
2025-02-06 15:58:18 +01:00
parent f67b78bd91
commit 930d2b4280
3 changed files with 17 additions and 4 deletions

View File

@@ -48,8 +48,12 @@ namespace hex::plugin::builtin {
callback();
}
} else if (menuItems.size() == 1) {
if (menu::menuItemEx(Lang(name), icon, shortcut, selectedCallback(), enabledCallback() && (view == nullptr || view->isFocused())))
callback();
if (menu::menuItemEx(Lang(name), icon, shortcut, selectedCallback(), enabledCallback())) {
if (shortcut == Shortcut::None)
callback();
else
ShortcutManager::runShortcut(shortcut, view);
}
} else {
bool isSubmenu = (menuItems.begin() + 1)->get() == ContentRegistry::Interface::impl::SubMenuValue;