diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-10-01 11:42:41 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-01 11:42:41 +0200 |
commit | 769691ab53f46763582a46df8c4583f9ba1a944f (patch) | |
tree | 3f86a8c9a3f4352be2a916170a9110cb12a66123 /editor/plugins | |
parent | 6ed3e9c182627385bf7e249bf770e845d0b949d8 (diff) | |
parent | ad30b0a8dd793efa2ca60b424f3dc1e25975de68 (diff) |
Merge pull request #51273 from EricEzaM/multiple-events-per-shortcut-take2
Diffstat (limited to 'editor/plugins')
-rw-r--r-- | editor/plugins/node_3d_editor_plugin.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp index dae3b6aaec..f179c01f89 100644 --- a/editor/plugins/node_3d_editor_plugin.cpp +++ b/editor/plugins/node_3d_editor_plugin.cpp @@ -2483,8 +2483,14 @@ static bool is_shortcut_pressed(const String &p_path) { if (shortcut.is_null()) { return false; } - InputEventKey *k = Object::cast_to<InputEventKey>(shortcut->get_event().ptr()); - if (k == nullptr) { + + const Array shortcuts = shortcut->get_events(); + Ref<InputEventKey> k; + if (shortcuts.size() > 0) { + k = shortcuts.front(); + } + + if (k.is_null()) { return false; } const Input &input = *Input::get_singleton(); |