Skip to content

Commit

Permalink
Merge pull request #56222 from godotengine/inputmap_undo
Browse files Browse the repository at this point in the history
  • Loading branch information
akien-mga authored Jan 13, 2022
2 parents 56f7d81 + d00e183 commit d13e0a3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions editor/project_settings_editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ void ProjectSettingsEditor::_device_input_add() {
int idx = edit_idx;
Dictionary old_val = ProjectSettings::get_singleton()->get(name);
Dictionary action = old_val.duplicate();
Array events = action["events"];
Array events = action["events"].duplicate();

switch (add_type) {
case INPUT_MOUSE_BUTTON: {
Expand Down Expand Up @@ -383,7 +383,7 @@ void ProjectSettingsEditor::_press_a_key_confirm() {

Dictionary old_val = ProjectSettings::get_singleton()->get(name);
Dictionary action = old_val.duplicate();
Array events = action["events"];
Array events = action["events"].duplicate();

for (int i = 0; i < events.size(); i++) {
Ref<InputEventKey> aie = events[i];
Expand Down Expand Up @@ -654,7 +654,7 @@ void ProjectSettingsEditor::_action_button_pressed(Object *p_obj, int p_column,
Dictionary action = old_val.duplicate();
int idx = ti->get_metadata(0);

Array events = action["events"];
Array events = action["events"].duplicate();
ERR_FAIL_INDEX(idx, events.size());
events.remove(idx);
action["events"] = events;
Expand Down

0 comments on commit d13e0a3

Please sign in to comment.