Settings/controls: fix editing command block

This commit is contained in:
Tamius Han 2019-04-12 00:04:38 +02:00
parent 80b7654db5
commit 9b808a2c36
2 changed files with 5 additions and 4 deletions

View File

@ -205,12 +205,12 @@ export default {
if (this.currentCmdIndex < 0) { if (this.currentCmdIndex < 0) {
this.action.cmd.push({ this.action.cmd.push({
action: action, action: action,
arg: arg.arg, arg: arg,
customArg: customArg, customArg: customArg,
}); });
} else { } else {
this.action.cmd[this.currentCmdIndex] = { this.action.cmd[this.currentCmdIndex] = {
cmd: action, action: action,
arg: arg, arg: arg,
customArg: customArg, customArg: customArg,
}; };

View File

@ -111,9 +111,10 @@ export default {
}, },
created () { created () {
if (this.action) { if (this.action) {
this.selectedAction = this.action.cmd; this.selectedAction = this.action.action;
console.log("THIS:ACTION", this.action)
this.selectedArgument = { 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 arg: this.action.arg
} }
this.customArgumentValue = this.action.customArg; this.customArgumentValue = this.action.customArg;