summaryrefslogtreecommitdiff
path: root/editor/action_map_editor.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-05-06 07:43:52 +0200
committerGitHub <noreply@github.com>2022-05-06 07:43:52 +0200
commit89449bd0e30f036f0aa21b2cb11d302bad9052be (patch)
treed08d774fa53fc3368b13a23c0c3b5a9cd6327d57 /editor/action_map_editor.cpp
parent066692b6d081f1577bc0ebcd84da204339218ec6 (diff)
parent1dc7bcc83c81b32c3651f3fa869055a0cce22085 (diff)
Merge pull request #59804 from KoBeWi/sponsored_by_Meta
Cleanup metadata usage
Diffstat (limited to 'editor/action_map_editor.cpp')
-rw-r--r--editor/action_map_editor.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/editor/action_map_editor.cpp b/editor/action_map_editor.cpp
index 01be5ae4fe..99355de361 100644
--- a/editor/action_map_editor.cpp
+++ b/editor/action_map_editor.cpp
@@ -136,10 +136,9 @@ void InputEventConfigurationDialog::_set_event(const Ref<InputEvent> &p_event, b
TreeItem *input_item = category->get_first_child();
if (input_item != nullptr) {
- // has_type this should be always true, unless the tree structure has been misconfigured.
- bool has_type = input_item->get_parent()->has_meta("__type");
- int input_type = input_item->get_parent()->get_meta("__type");
- if (!has_type) {
+ // input_type should always be > 0, unless the tree structure has been misconfigured.
+ int input_type = input_item->get_parent()->get_meta("__type", 0);
+ if (input_type == 0) {
return;
}