Fixed 'Clear All IO' button

This commit is contained in:
n1474335 2023-02-03 15:54:45 +00:00
parent 0b2cb7e68c
commit 7a2517fd61
3 changed files with 31 additions and 19 deletions

View file

@ -262,6 +262,10 @@ class InputWaiter {
log.debug("Adding new InputWorker");
this.inputWorker = new InputWorker();
this.inputWorker.postMessage({
action: "setLogLevel",
data: log.getLevel()
});
this.inputWorker.postMessage({
action: "updateMaxWorkers",
data: this.maxWorkers
@ -273,10 +277,7 @@ class InputWaiter {
activeTab: this.manager.tabs.getActiveTab("input")
}
});
this.inputWorker.postMessage({
action: "setLogLevel",
data: log.getLevel()
});
this.inputWorker.addEventListener("message", this.handleInputWorkerMessage.bind(this));
}
@ -1103,8 +1104,11 @@ class InputWaiter {
this.manager.worker.setupChefWorker();
this.addInput(true);
// Fire the statechange event as the input has been modified
window.dispatchEvent(this.manager.statechange);
// Fire the statechange event as the input has been modified,
// leaving enough time for workers to be initialised
setTimeout(function() {
window.dispatchEvent(this.manager.statechange);
}.bind(this), 100);
}
/**