backlight: apply positions changed in the preferences without restart

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
John Henry BealeandClaude Opus 5.5 committed 2026-10-23 08:27:23 +02:00
1 parent f3bbfbeadd
commit 4b1e0f9a94
1 file changed
+4
+4
View File
@@ -704,6 +704,10 @@ verbose bits:
elif par_nm == AppCfg.DFT_POS_BKLGT:
d=dict(map(lambda x:(x.name(),x.value()), parent.children()))
cfg.setValue(par_nm,d)
try:
app._backlight._pos=d # Backlight keeps its own copy of the positions
except AttributeError:
pass
elif par_nm == AppCfg.DFT_POS_DET:
d={x.name(): x.value() for x in parent.children() if x.type()!='action'}
cfg.setValue(par_nm,d)