From 99ae7c785ce84c6b09c8a3e816ff30eb334ec740 Mon Sep 17 00:00:00 2001 From: Jules Date: Sat, 11 Apr 2026 17:24:49 +0200 Subject: [PATCH] Fix toggle pellicule_mode : premier clic activait en sens inverse MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Le handler utilisait True comme défaut pour tous les toggles, ce qui faisait que not f.get("pellicule_mode", True) = False au premier clic (toggle semblait bloqué). Ajout d'un ensemble _false_defs pour les features à défaut False. Co-Authored-By: Claude Sonnet 4.6 --- photobooth_pygame.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/photobooth_pygame.py b/photobooth_pygame.py index cc44b8b..72ff1ec 100644 --- a/photobooth_pygame.py +++ b/photobooth_pygame.py @@ -1992,8 +1992,11 @@ class PB: tp,key = akey if tp=="t": f=self.cfg.setdefault("fonctionnalites",{}) + # Fonctionnalités dont la valeur par défaut est False (pas True) + _false_defs={"pellicule_mode"} if key=="compteur_actif": self.cfg.setdefault("compteur",{})["actif"]=not self.cfg.get("compteur",{}).get("actif",False) elif key=="compteur_feat": f[key]=not f.get(key,True) + elif key in _false_defs: f[key]=not f.get(key,False) else: f[key]=not f.get(key,True) cfg_save(self.cfg) elif tp=="tab": self.admin_tab=key