We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 432e16e commit 7083b6aCopy full SHA for 7083b6a
lib/libimhex/source/api/shortcut_manager.cpp
@@ -367,10 +367,16 @@ namespace hex {
367
if (keyCode != 0)
368
s_prevShortcut = Shortcut(pressedShortcut.getKeys());
369
370
- const auto inheritedShortcutsView = currentView->getMenuItemInheritView();
371
- if (!runShortcut(pressedShortcut, currentView)) {
372
- if (inheritedShortcutsView != nullptr)
373
- runShortcut(pressedShortcut, inheritedShortcutsView);
+ std::set<const View*> processedViews;
+ while (true) {
+ if (runShortcut(pressedShortcut, currentView)) {
+ break;
374
+ }
375
+
376
+ processedViews.insert(currentView);
377
+ currentView = currentView->getMenuItemInheritView();
378
+ if (currentView == nullptr || processedViews.contains(currentView))
379
380
}
381
382
0 commit comments