Power User: Fix preset error

The checkbox wasn't being looked up correctly, causing issues when
setting some properties.

Signed-off-by: kingbri <bdashore3@proton.me>
This commit is contained in:
kingbri 2023-10-20 21:50:33 -04:00
parent 18c74ecf09
commit 8d6eaf3da4
1 changed files with 6 additions and 2 deletions

View File

@ -1161,9 +1161,13 @@ function loadContextSettings() {
const $element = $(`#${control.id}`); const $element = $(`#${control.id}`);
if (control.isCheckbox) { if (control.isCheckbox) {
$element.prop('checked', power_user.context[control.property]).trigger('input'); $element
.prop('checked', control.isGlobalSetting ? power_user[control.property] : power_user.context[control.property])
.trigger('input');
} else { } else {
$element.val(power_user.context[control.property]).trigger('input'); $element
.val(control.isGlobalSetting ? power_user[control.property] : power_user.context[control.property])
.trigger('input');
} }
} }
}); });