Skip to content

Commit

Permalink
global: add option to enable/disable forced refresh after preset change
Browse files Browse the repository at this point in the history
  • Loading branch information
paradajz committed Feb 20, 2024
1 parent 20ed835 commit 92899b4
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/definitions/block/global/GlobalForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
<template #default="{ form, showField, onSettingChange }">
<Section v-if="supportedPresetsCount > 1" title="Presets">
<div class="form-grid">
<FormField
v-if="showField(sections.ForceValueRefreshAfterPresetChange)"
:value="form.forceValueRefreshAfterPresetChange"
:field-definition="sections.ForceValueRefreshAfterPresetChange"
@modified="onSettingChange"
/>
<FormField
v-if="showField(sections.PreservePresetState)"
class="col-span-2"
Expand Down
10 changes: 10 additions & 0 deletions src/definitions/block/global/global.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,16 @@ const sections: Dictionary<ISectionDefinition> = {
Otherwise, preset specified with "Active preset" option is remembered. This is not related to saving of configuration
to specified preset - the configuration data is always retained even after power off.`,
},
ForceValueRefreshAfterPresetChange: {
block: Block.Global,
key: "forceValueRefreshAfterPresetChange",
type: SectionType.Setting,
section: 2,
settingIndex: 2,
component: FormInputComponent.Toggle,
label: "Force value refresh after preset change",
helpText: `When enabled, all components will resend their current value once the preset changes after a small delay.`,
},
ActivePreset: {
block: Block.Global,
key: "activePreset",
Expand Down

0 comments on commit 92899b4

Please sign in to comment.