From 83bfc3866c714074aeb550907118c6df0d93a44a Mon Sep 17 00:00:00 2001 From: Christian Date: Mon, 18 Mar 2024 12:05:51 +0100 Subject: [PATCH] fix(controller): document root cause QTBUG-95677 --- res/controllers/Behringer-Extension-scripts.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/res/controllers/Behringer-Extension-scripts.js b/res/controllers/Behringer-Extension-scripts.js index 41f49b968da..cc912e64d3a 100644 --- a/res/controllers/Behringer-Extension-scripts.js +++ b/res/controllers/Behringer-Extension-scripts.js @@ -239,13 +239,12 @@ isEnabled: function() { return this.id !== 0; }, start: function() { this.reset(); - const timer = this; - this.id = engine.beginTimer(this.timeout, () => { - if (timer.oneShot) { - timer.disable(); + this.id = engine.beginTimer(this.timeout, function() { + if (this.oneShot) { + this.disable(); } - timer.action.call(timer.owner); - }, this.oneShot); + this.action.call(this.owner); + }.bind(this), this.oneShot); // .bind(this) is required instead of arrow function for Qt < 6.2.4 due to QTBUG-95677 }, reset: function() { if (this.isEnabled()) {