From ef3d3e52908f1035fa89095d2fa94d15e7c3bc8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vin=C3=ADcius?= Date: Sat, 14 Nov 2020 16:44:32 -0300 Subject: [PATCH] ui: fix feature entry bug when feature is not on the list --- lib/solaar/ui/diversion_rules.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/solaar/ui/diversion_rules.py b/lib/solaar/ui/diversion_rules.py index cc8de26d..331ab9ad 100644 --- a/lib/solaar/ui/diversion_rules.py +++ b/lib/solaar/ui/diversion_rules.py @@ -897,7 +897,10 @@ class FeatureUI(ConditionUI): def show(self, component): super().show(component) with self.ignore_changes(): - self.field.set_active_id(str(component.feature) if component.feature else '') + f = str(component.feature) if component.feature else '' + self.field.set_active_id(f) + if f not in self.FEATURES_WITH_DIVERSION: + self.field.get_child().set_text(f) def collect_value(self): return (self.field.get_active_text() or '').strip()