ui: fix feature entry bug when feature is not on the list

This commit is contained in:
Vinícius 2020-11-14 16:44:32 -03:00 committed by Peter F. Patel-Schneider
parent 487e1a3ded
commit ef3d3e5290
1 changed files with 4 additions and 1 deletions

View File

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