From 9b808a2c363bca34c814670dbf22233b69b9ea8d Mon Sep 17 00:00:00 2001 From: Tamius Han Date: Fri, 12 Apr 2019 00:04:38 +0200 Subject: [PATCH] Settings/controls: fix editing command block --- src/options/controls-settings/add-edit-action-popup.vue | 4 ++-- .../controls-settings/command-builder/command-add-edit.vue | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/options/controls-settings/add-edit-action-popup.vue b/src/options/controls-settings/add-edit-action-popup.vue index 060d375..0ba7d90 100644 --- a/src/options/controls-settings/add-edit-action-popup.vue +++ b/src/options/controls-settings/add-edit-action-popup.vue @@ -205,12 +205,12 @@ export default { if (this.currentCmdIndex < 0) { this.action.cmd.push({ action: action, - arg: arg.arg, + arg: arg, customArg: customArg, }); } else { this.action.cmd[this.currentCmdIndex] = { - cmd: action, + action: action, arg: arg, customArg: customArg, }; diff --git a/src/options/controls-settings/command-builder/command-add-edit.vue b/src/options/controls-settings/command-builder/command-add-edit.vue index 064b440..0a8d0e8 100644 --- a/src/options/controls-settings/command-builder/command-add-edit.vue +++ b/src/options/controls-settings/command-builder/command-add-edit.vue @@ -111,9 +111,10 @@ export default { }, created () { if (this.action) { - this.selectedAction = this.action.cmd; + this.selectedAction = this.action.action; + console.log("THIS:ACTION", this.action) this.selectedArgument = { - name: ActionList[this.action.cmd].args.find(x => x.arg === this.action.arg) || ActionList[this.action.cmd].args.find(x => x.customArg), + name: ActionList[this.action.action].args.find(x => x.arg === this.action.arg) || ActionList[this.action.action].args.find(x => x.customArg), arg: this.action.arg } this.customArgumentValue = this.action.customArg;