We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0b8a128 commit 6cd3eceCopy full SHA for 6cd3ece
1 file changed
internal_filesystem/builtin/apps/com.micropythonos.settings/assets/settings.py
@@ -271,12 +271,9 @@ def save_setting(self, setting):
271
ui_options = setting.get("ui_options")
272
if ui and ui == "radiobuttons" and ui_options:
273
selected_idx = self.active_radio_index
274
- if selected_idx == 0: # only supports 2 options, could be made more generic
275
- new_value = ui_options[0][1]
276
- elif selected_idx == 1:
277
- new_value = ui_options[1][1]
278
- else:
279
- return # nothing to save
+ new_value = ""
+ if selected_idx >= 0:
+ new_value = ui_options[selected_idx][1]
280
elif ui and ui == "dropdown" and ui_options:
281
selected_index = self.dropdown.get_selected()
282
print(f"selected item: {selected_index}")
0 commit comments