diff options
author | Juan Linietsky <reduzio@gmail.com> | 2017-09-06 18:13:05 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2017-09-06 18:14:04 -0300 |
commit | c771e03ee235e6f5089134a03f62fca84fcf43fa (patch) | |
tree | d171c7262fe4ac850d2df3e4320e178c79e9cdf9 /editor | |
parent | 0b8fa1e01068af9924742ade2625e021ccd2c5a8 (diff) |
-Fixed changes to default input actions not working, closes #10502
-Added Array.duplicate() method, needed to fix above
Diffstat (limited to 'editor')
-rw-r--r-- | editor/project_settings_editor.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/editor/project_settings_editor.cpp b/editor/project_settings_editor.cpp index 49687a504f..1f65589643 100644 --- a/editor/project_settings_editor.cpp +++ b/editor/project_settings_editor.cpp @@ -182,8 +182,8 @@ void ProjectSettingsEditor::_device_input_add() { Ref<InputEvent> ie; String name = add_at; int idx = edit_idx; - Variant old_val = ProjectSettings::get_singleton()->get(name); - Array arr = old_val; + Array old_val = ProjectSettings::get_singleton()->get(name); + Array arr = old_val.duplicate(); switch (add_type) { @@ -285,8 +285,8 @@ void ProjectSettingsEditor::_press_a_key_confirm() { String name = add_at; int idx = edit_idx; - Variant old_val = ProjectSettings::get_singleton()->get(name); - Array arr = old_val; + Array old_val = ProjectSettings::get_singleton()->get(name); + Array arr = old_val.duplicate(); for (int i = 0; i < arr.size(); i++) { |