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
|
|
@ -1,11 +1,17 @@
|
|||
# Changelog
|
||||
|
||||
## 1.9.6
|
||||
|
||||
- bug fixes
|
||||
- advanced syntaxes: `VAR{}` not updating when the default value is edited
|
||||
- editor: fix "Bring to front" and "Send to back" context menu actions
|
||||
|
||||
|
||||
## 1.9.5
|
||||
|
||||
- bug fixes
|
||||
- advanced syntaxes: various isses and regressions
|
||||
- editor: preserve advanced syntaxes in `left` and `top` when pasting a widget
|
||||
- editor: fix "Bring to front" and "Send to back" context menu actions
|
||||
|
||||
- editor
|
||||
- tree: update widget visibility when it changes dynamically
|
||||
|
|
|
|||
|
|
@ -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