matrices: register hashes to ensure subwidgets gets purged when editing

This commit is contained in:
jean-emmanuel 2017-06-13 18:35:00 +02:00
parent be6b15b93e
commit 04a322dda1
5 changed files with 20 additions and 0 deletions

View file

@ -19,6 +19,18 @@ module.exports = class _matrices_base extends _widgets_base {
})
}
registerHashes() {
this.hashes = [this.hash]
var widgets = this.widget.find('.widget')
for (let widget of widgets) {
if (widget.abstract.hashes) {
this.hashes = this.hashes.concat(widget.abstract.hashes)
} else {
this.hashes.push(widget.abstract.hash)
}
}
}
// conflicts with switchers (double osc send)
// setValue(v, options={}) {

View file

@ -92,6 +92,8 @@ module.exports = class Keyboard extends _matrices_base {
if (this.getProp('traversing')) this.widget.enableTraversingGestures()
this.registerHashes()
}
}

View file

@ -89,6 +89,8 @@ module.exports = class Multifader extends _matrices_base {
if (this.getProp('traversing')) this.widget.enableTraversingGestures()
this.registerHashes()
}
}

View file

@ -74,6 +74,8 @@ module.exports = class Multipush extends _matrices_base {
if (this.getProp('traversing')) this.widget.enableTraversingGestures()
this.registerHashes()
}
}

View file

@ -73,6 +73,8 @@ module.exports = class Multitoggle extends _matrices_base {
if (this.getProp('traversing')) this.widget.enableTraversingGestures()
this.registerHashes()
}
}