force cache clear only when synth widgets present

This commit is contained in:
Stewart Allen 2021-02-08 10:10:31 -05:00
commit 3283d879ef
5 changed files with 13 additions and 22 deletions

View file

@ -23,13 +23,18 @@
function filterSynth() {
// remove synth widgets
let clear = false;
api.widgets.filter((widget) => {
if (widget.track.synth) {
api.const.SPACE.platform.remove(widget.mesh);
kiri.Widget.Groups.remove(widget);
clear = true;
}
return !widget.track.synth
});
if (clear) {
kiri.client.clear();
}
}
api.event.on("mode.set", mode => {