ui: fix bug that made setting values not appear

This commit is contained in:
Vinícius 2022-01-21 16:48:11 -03:00 committed by Peter F. Patel-Schneider
parent bf8b861275
commit 49f2c6d8b9
1 changed files with 1 additions and 0 deletions

View File

@ -2205,6 +2205,7 @@ class SetUI(ActionUI):
all_values = cls._all_choices(setting_name)[0] all_values = cls._all_choices(setting_name)[0]
if isinstance(all_values, NamedInts): if isinstance(all_values, NamedInts):
value = all_values[value] value = all_values[value]
disp.append(value)
elif kind == _SKIND.multiple_range and isinstance(value, dict) and len(value) == 1: elif kind == _SKIND.multiple_range and isinstance(value, dict) and len(value) == 1:
k, v = next(iter(value.items())) k, v = next(iter(value.items()))
k = (getattr(setting, '_labels_sub', {}).get(k, (None, ))[0] if setting else None) or k k = (getattr(setting, '_labels_sub', {}).get(k, (None, ))[0] if setting else None) or k