mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-02-21 12:29:04 -06:00
No longer trigger an assert when binding a key to an action that does not exist (closes #2485)
This commit is contained in:
@@ -55,11 +55,11 @@ void KeybindingManager::keyboardCallback(Key key, KeyModifier modifier, KeyActio
|
||||
auto ret = _keyLua.equal_range({ key, modifier });
|
||||
for (auto it = ret.first; it != ret.second; ++it) {
|
||||
ghoul_assert(!it->second.empty(), "Action must not be empty");
|
||||
ghoul_assert(
|
||||
global::actionManager->hasAction(it->second),
|
||||
"Action must be registered"
|
||||
);
|
||||
global::actionManager->triggerAction(it->second, ghoul::Dictionary());
|
||||
if (!global::actionManager->hasAction(it->second)) {
|
||||
// Silently ignoring the unknown action as the user might have intended to
|
||||
// bind a key to multiple actions, only one of which could be defined
|
||||
global::actionManager->triggerAction(it->second, ghoul::Dictionary());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user