ui: correctly handle selection of [empty] in rule editor
This commit is contained in:
parent
df2df301e2
commit
d8f321a5e9
|
|
@ -1101,9 +1101,12 @@ class UnsupportedRuleComponentUI(RuleComponentUI):
|
||||||
|
|
||||||
def create_widgets(self):
|
def create_widgets(self):
|
||||||
self.label = Gtk.Label(valign=Gtk.Align.CENTER, hexpand=True)
|
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)
|
self.widgets[self.label] = (0, 0, 1, 1)
|
||||||
|
|
||||||
|
def collect_value(self):
|
||||||
|
return self.component.components[:] # not editable on the bottom panel
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def right_label(cls, component):
|
def right_label(cls, component):
|
||||||
return str(component)
|
return str(component)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue