File tree Expand file tree Collapse file tree 2 files changed +10
-9
lines changed
internal_filesystem/builtin/apps/com.micropythonos.settings/assets Expand file tree Collapse file tree 2 files changed +10
-9
lines changed Original file line number Diff line number Diff line change 110.5.1
22=====
3- - OSUpdate app: pause download when wifi is lost, resume when reconnected
43- Fri3d Camp 2024 Badge: workaround ADC2+WiFi conflict by temporarily disable WiFi to measure battery level
5- - Fri3d Camp 2024 Badge: improve battery monitor calibration
4+ - Fri3d Camp 2024 Badge: improve battery monitor calibration to fix 0.1V delta
65- AppStore app: remove unnecessary scrollbar over publisher's name
6+ - OSUpdate app: pause download when wifi is lost, resume when reconnected
7+ - Settings app: fix un-checking of radio button
78
890.5.0
910=====
Original file line number Diff line number Diff line change @@ -260,18 +260,18 @@ def radio_event_handler(self, event):
260260 target_obj_state = target_obj .get_state ()
261261 print (f"target_obj state { target_obj .get_text ()} is { target_obj_state } " )
262262 checked = target_obj_state & lv .STATE .CHECKED
263+ current_checkbox_index = target_obj .get_index ()
264+ print (f"current_checkbox_index: { current_checkbox_index } " )
263265 if not checked :
264- print ("it's not checked, nothing to do!" )
266+ if self .active_radio_index == current_checkbox_index :
267+ print (f"unchecking { current_checkbox_index } " )
268+ self .active_radio_index = - 1 # nothing checked
265269 return
266270 else :
267- new_checked = target_obj .get_index ()
268- print (f"new_checked: { new_checked } " )
269- if self .active_radio_index >= 0 :
271+ if self .active_radio_index >= 0 : # is there something to uncheck?
270272 old_checked = self .radio_container .get_child (self .active_radio_index )
271273 old_checked .remove_state (lv .STATE .CHECKED )
272- new_checked_obj = self .radio_container .get_child (new_checked )
273- new_checked_obj .add_state (lv .STATE .CHECKED )
274- self .active_radio_index = new_checked
274+ self .active_radio_index = current_checkbox_index
275275
276276 def create_radio_button (self , parent , text , index ):
277277 cb = lv .checkbox (parent )
You can’t perform that action at this time.
0 commit comments