fix(dropdown): always invalidate if selected option changes
Reported on the forum: https://forum.lvgl.io/t/dropdown-selected-value-doesnt-change-after-calling-lv-dropdown-set-selected/3983
This commit is contained in:
@@ -356,10 +356,8 @@ void lv_dropdown_set_selected(lv_obj_t * ddlist, uint16_t sel_opt)
|
||||
|
||||
ext->sel_opt_id = sel_opt < ext->option_cnt ? sel_opt : ext->option_cnt - 1;
|
||||
ext->sel_opt_id_orig = ext->sel_opt_id;
|
||||
/*Move the list to show the current option*/
|
||||
if(ext->page != NULL) {
|
||||
lv_obj_invalidate(ddlist);
|
||||
}
|
||||
|
||||
lv_obj_invalidate(ddlist);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user