From d8f321a5e944fc7030625122844b5dd280e13af9 Mon Sep 17 00:00:00 2001 From: "Peter F. Patel-Schneider" Date: Tue, 11 Feb 2025 17:27:19 -0500 Subject: [PATCH] ui: correctly handle selection of [empty] in rule editor --- 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 2e3b90de9..7083d52bf 100644 --- a/lib/solaar/ui/diversion_rules.py +++ b/lib/solaar/ui/diversion_rules.py @@ -1101,9 +1101,12 @@ class UnsupportedRuleComponentUI(RuleComponentUI): def create_widgets(self): self.label = Gtk.Label(valign=Gtk.Align.CENTER, hexpand=True) - self.label.set_text(_("This editor does not support the selected rule component yet.")) + self.label.set_text(_("This editor does not support the selected rule component yet.") if self.component else "") self.widgets[self.label] = (0, 0, 1, 1) + def collect_value(self): + return self.component.components[:] # not editable on the bottom panel + @classmethod def right_label(cls, component): return str(component)