widget: update prop cache sequentially to avoid multi-prop edition from causing errors (eg: address & preArgs at the same time => cache error because the old value is needed by the manager)
This commit is contained in:
parent
fa7f4481a2
commit
0afa1839ff
2 changed files with 11 additions and 5 deletions
|
|
@ -1,5 +1,10 @@
|
|||
# Changelog
|
||||
|
||||
## 1.5.3
|
||||
|
||||
- bug fixes
|
||||
- editor: error when `preArgs` and `address` are modified at the same time (affects `/EDIT` command and matrix/clone widgets)
|
||||
|
||||
## 1.5.2
|
||||
|
||||
- bug fixes
|
||||
|
|
|
|||
|
|
@ -730,8 +730,7 @@ class Widget extends EventEmitter {
|
|||
|
||||
} else {
|
||||
|
||||
this.cachedProps[propName] = propValue
|
||||
changedProps.push({propName, oldPropValue})
|
||||
changedProps.push({propName, propValue, oldPropValue})
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -745,13 +744,11 @@ class Widget extends EventEmitter {
|
|||
|
||||
}
|
||||
|
||||
if (options && options.fromEditor) {
|
||||
this.checkLinkedProps(propNames)
|
||||
}
|
||||
|
||||
if (changedProps.length) {
|
||||
|
||||
for (var i in changedProps) {
|
||||
this.cachedProps[changedProps[i].propName] = changedProps[i].propValue
|
||||
this.onPropChanged(changedProps[i].propName, options, changedProps[i].oldPropValue)
|
||||
}
|
||||
|
||||
|
|
@ -764,6 +761,10 @@ class Widget extends EventEmitter {
|
|||
|
||||
}
|
||||
|
||||
if (options && options.fromEditor) {
|
||||
this.checkLinkedProps(propNames)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
onPropChanged(propName, options={}, oldPropValue) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue