File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
internal_filesystem/builtin/apps/com.micropythonos.settings/assets Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -271,12 +271,9 @@ def save_setting(self, setting):
271271 ui_options = setting .get ("ui_options" )
272272 if ui and ui == "radiobuttons" and ui_options :
273273 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
274+ new_value = ""
275+ if selected_idx >= 0 :
276+ new_value = ui_options [selected_idx ][1 ]
280277 elif ui and ui == "dropdown" and ui_options :
281278 selected_index = self .dropdown .get_selected ()
282279 print (f"selected item: { selected_index } " )
You can’t perform that action at this time.
0 commit comments