fix: Properly trigger shortcuts on selected view on macOS

This commit is contained in:
WerWolv
2025-02-06 22:13:06 +01:00
parent f17d0d3ae1
commit 96afa650d1
5 changed files with 36 additions and 9 deletions

View File

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