Skip to content

Commit

Permalink
ui: fix error when updating ChoiceControlBig box
Browse files Browse the repository at this point in the history
  • Loading branch information
pfps committed Feb 8, 2025
1 parent cefc502 commit 8d0d71b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/solaar/ui/config_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,9 @@ def get_choice(self):
key = self.get_text()
return next((x for x in self.choices if x == key), None)

def set_choices(self, choices):
self.choices = choices

def changed(self, *args):
self.value = self.get_choice()
icon = "dialog-warning" if self.value is None else "dialog-question" if self.get_sensitive() else ""
Expand Down Expand Up @@ -283,7 +286,6 @@ def map_populate_value_box(self, key_choice):
choices = self.sbox.setting.choices[key_choice]
if choices != self.value_choices:
self.value_choices = choices
self.valueBox.remove_all()
self.valueBox.set_choices(choices)
current = self.sbox.setting._value.get(key_choice) if self.sbox.setting._value else None
if current is not None:
Expand Down

0 comments on commit 8d0d71b

Please sign in to comment.