From c771e03ee235e6f5089134a03f62fca84fcf43fa Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Wed, 6 Sep 2017 18:13:05 -0300 Subject: -Fixed changes to default input actions not working, closes #10502 -Added Array.duplicate() method, needed to fix above --- editor/project_settings_editor.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'editor') 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 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++) { -- cgit v1.2.3