advanced syntaxes: VAR{} not updating when the default value is edited
This commit is contained in:
parent
16442b664f
commit
60621203e5
3 changed files with 19 additions and 1 deletions
|
|
@ -649,6 +649,16 @@ class Widget extends EventEmitter {
|
|||
|
||||
}
|
||||
|
||||
// update value if default changed
|
||||
if (
|
||||
value !== undefined &&
|
||||
!this.variables[name].updated && // only true on edit
|
||||
value !== this.variables[name].default
|
||||
) {
|
||||
this.variables[name].default = value
|
||||
this.variables[name].value = value
|
||||
}
|
||||
|
||||
var r = this.variables[name].value
|
||||
|
||||
var varname = 'VAR_' + varnumber
|
||||
|
|
|
|||
|
|
@ -111,7 +111,9 @@ class ScriptVm extends Vm {
|
|||
if (widgets[i].variables[name]) {
|
||||
|
||||
widgets[i].variables[name].value = value
|
||||
widgets[i].variables[name].updated = 1
|
||||
widgets[i].updateProps(widgets[i].variables[name].propNames)
|
||||
widgets[i].variables[name].updated = 0
|
||||
|
||||
} else {
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue