ui: correctly handle selection of [empty] in rule editor

This commit is contained in:
Peter F. Patel-Schneider 2025-02-11 17:27:19 -05:00
parent df2df301e2
commit d8f321a5e9
1 changed files with 4 additions and 1 deletions

View File

@ -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)