diff options
author | Christian <git-developer@users.noreply.github.com> | 2020-11-16 05:44:17 +0100 |
---|---|---|
committer | Christian <git-developer@users.noreply.github.com> | 2020-11-16 13:36:00 +0100 |
commit | 96bac236cf1ad9f43f9b065ebe3f6f2c16010d59 (patch) | |
tree | 2bd8074c46ccf496f2eede4e9f182819cbbf84be /res | |
parent | 85ef6ca3ba4524f98c12c57a0e5b7fd62187fd08 (diff) |
fix(midi-components): declare EffectUnitKnob.number before first use
This removes the warning
```Warning [Controller]: ControlDoublePrivate::getControl returning NULL for ( "[EffectRack1_EffectUnit2_Effectundefined]" , "meta" )```
when an effect unit is created. First use is in `onFocusChange()`,
triggered by the constructor.
Diffstat (limited to 'res')
-rw-r--r-- | res/controllers/midi-components-0.0.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/res/controllers/midi-components-0.0.js b/res/controllers/midi-components-0.0.js index 79ce9d948f..ff8ed18e02 100644 --- a/res/controllers/midi-components-0.0.js +++ b/res/controllers/midi-components-0.0.js @@ -749,6 +749,7 @@ this.setCurrentUnit = function(newNumber) { this.currentUnitNumber = newNumber; this.group = "[EffectRack1_EffectUnit" + newNumber + "]"; + if (allowFocusWhenParametersHidden) { engine.setValue(this.group, "show_focus", 0); } else { @@ -866,6 +867,7 @@ }; this.EffectUnitKnob.prototype = new Pot({ group: this.group, + number: this.currentUnitNumber, unshift: function() { this.input = function(channel, control, value, _status, _group) { if (this.MSB !== undefined) { |