fixes if the freed memory become dirty
This commit is contained in:
@@ -586,14 +586,14 @@ static lv_res_t lv_ddlist_signal(lv_obj_t * ddlist, lv_signal_t sign, void * par
|
||||
}
|
||||
} else if(c == LV_GROUP_KEY_ENTER) {
|
||||
if(ext->opened) {
|
||||
ext->sel_opt_id_ori = ext->sel_opt_id;
|
||||
ext->opened = 0;
|
||||
if(ext->action) ext->action(ddlist);
|
||||
#if USE_LV_GROUP
|
||||
lv_group_t * g = lv_obj_get_group(ddlist);
|
||||
bool editing = lv_group_get_editing(g);
|
||||
if(editing) lv_group_set_editing(g, false); /*In edit mode go to navigate mode if an option is selected*/
|
||||
#endif
|
||||
ext->sel_opt_id_ori = ext->sel_opt_id;
|
||||
ext->opened = 0;
|
||||
if(ext->action) res = ext->action(ddlist);
|
||||
} else {
|
||||
ext->opened = 1;
|
||||
}
|
||||
|
||||
@@ -767,8 +767,14 @@ static lv_res_t lv_list_btn_signal(lv_obj_t * btn, lv_signal_t sign, void * para
|
||||
last_clicked_btn = btn;
|
||||
|
||||
}
|
||||
#endif
|
||||
if(sign == LV_SIGNAL_CLEANUP) {
|
||||
|
||||
lv_obj_t * list = lv_obj_get_parent(lv_obj_get_parent(btn));
|
||||
lv_obj_t * sel = lv_list_get_btn_selected(list);
|
||||
if(sel == btn) lv_list_set_btn_selected(list, lv_list_get_next_btn(list, btn));
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
@@ -355,6 +355,8 @@ void lv_page_glue_obj(lv_obj_t * obj, bool glue)
|
||||
void lv_page_focus(lv_obj_t * page, const lv_obj_t * obj, uint16_t anim_time)
|
||||
{
|
||||
|
||||
lv_page_ext_t * ext = lv_obj_get_ext_attr(page);
|
||||
|
||||
#if USE_LV_ANIMATION == 0
|
||||
anim_time = 0;
|
||||
#else
|
||||
@@ -362,9 +364,10 @@ void lv_page_focus(lv_obj_t * page, const lv_obj_t * obj, uint16_t anim_time)
|
||||
* because it can overide the current changes*/
|
||||
lv_anim_del(page, (lv_anim_fp_t)lv_obj_set_y);
|
||||
lv_anim_del(page, (lv_anim_fp_t)lv_obj_set_pos);
|
||||
lv_anim_del(ext->scrl, (lv_anim_fp_t)lv_obj_set_y);
|
||||
lv_anim_del(ext->scrl, (lv_anim_fp_t)lv_obj_set_pos);
|
||||
#endif
|
||||
|
||||
lv_page_ext_t * ext = lv_obj_get_ext_attr(page);
|
||||
lv_style_t * style = lv_page_get_style(page, LV_PAGE_STYLE_BG);
|
||||
lv_style_t * style_scrl = lv_page_get_style(page, LV_PAGE_STYLE_SCRL);
|
||||
|
||||
|
||||
@@ -358,14 +358,15 @@ static lv_res_t lv_roller_signal(lv_obj_t * roller, lv_signal_t sign, void * par
|
||||
lv_roller_set_selected(roller, ext->ddlist.sel_opt_id - 1, true);
|
||||
}
|
||||
} else if(c == LV_GROUP_KEY_ENTER) {
|
||||
ext->ddlist.sel_opt_id_ori = ext->ddlist.sel_opt_id; /*Set the entered value as default*/
|
||||
if(ext->ddlist.action) ext->ddlist.action(roller);
|
||||
#if USE_LV_GROUP
|
||||
lv_group_t * g = lv_obj_get_group(roller);
|
||||
bool editing = lv_group_get_editing(g);
|
||||
lv_group_t * g = lv_obj_get_group(roller);
|
||||
bool editing = lv_group_get_editing(g);
|
||||
|
||||
if(editing) lv_group_set_editing(g, false); /*In edit mode go to navigate mode if an option is selected*/
|
||||
|
||||
if(editing) lv_group_set_editing(g, false); /*In edit mode go to navigate mode if an option is selected*/
|
||||
#endif
|
||||
ext->ddlist.sel_opt_id_ori = ext->ddlist.sel_opt_id; /*Set the entered value as default*/
|
||||
if(ext->ddlist.action) res = ext->ddlist.action(roller);
|
||||
}
|
||||
} else if(sign == LV_SIGNAL_GET_TYPE) {
|
||||
lv_obj_type_t * buf = param;
|
||||
|
||||
Reference in New Issue
Block a user