gui: correctly show initial value for choice settings
This commit is contained in:
parent
90cc629f26
commit
bc6b1de472
|
|
@ -656,7 +656,7 @@ class ChoicesValidator(object):
|
|||
def __init__(self, choices, bytes_count=None, read_skip_bytes_count=None, write_prefix_bytes=b'', **_ignore):
|
||||
assert choices is not None
|
||||
assert isinstance(choices, _NamedInts)
|
||||
assert len(choices) > 2
|
||||
assert len(choices) > 1
|
||||
self.choices = choices
|
||||
self.needs_current_value = False
|
||||
|
||||
|
|
|
|||
|
|
@ -242,7 +242,7 @@ def _update_setting_item(sbox, value, is_online=True):
|
|||
if isinstance(control, Gtk.Switch):
|
||||
control.set_active(value)
|
||||
elif isinstance(control, Gtk.ComboBoxText):
|
||||
control.set_active_id(str(value))
|
||||
control.set_active_id(str(int(value)))
|
||||
elif isinstance(control, Gtk.Scale):
|
||||
control.set_value(int(value))
|
||||
elif isinstance(control, Gtk.HBox):
|
||||
|
|
|
|||
Loading…
Reference in New Issue