Select log levels by default visually

Fixes bug where the first time visiting Execution Log view
all log levels are deselected but log items with all levels are still
displayed.
This commit is contained in:
Patrik Elfström 2024-11-10 01:07:57 +01:00
commit d2d089618b
No known key found for this signature in database
GPG key ID: FB7364E56AB95F97

View file

@ -188,12 +188,8 @@
let selectedLogLevels = JSON.parse(LocalPreferences.get("qbt_selected_log_levels")) || ["1", "2", "4", "8"]; let selectedLogLevels = JSON.parse(LocalPreferences.get("qbt_selected_log_levels")) || ["1", "2", "4", "8"];
const init = () => { const init = () => {
$("logLevelSelect").getElements("option").each((x) => { for (const option of $("logLevelSelect").options)
if (selectedLogLevels.indexOf(x.value.toString()) !== -1) option.setAttribute("selected", selectedLogLevels.includes(option.value));
x.selected = true;
else
x.selected = false;
});
selectBox = new vanillaSelectBox("#logLevelSelect", { selectBox = new vanillaSelectBox("#logLevelSelect", {
maxHeight: 200, maxHeight: 200,