Skip to content

Commit

Permalink
ui: correctly handle selection of [empty] in rule editor
Browse files Browse the repository at this point in the history
  • Loading branch information
pfps committed Feb 11, 2025
1 parent df2df30 commit d8f321a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/solaar/ui/diversion_rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit d8f321a

Please sign in to comment.