1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-14 06:42:58 +08:00

ddlist: fix animation issues

The wrong animation function was used for the delete, and so the animation was never deleted.
Must force animation callback on delete, so that the correct selection highlighting is shown.
This commit is contained in:
Josh 2019-04-18 12:26:40 -07:00
parent 2abf55f4c4
commit b477a14fdf

View File

@ -847,8 +847,9 @@ static void lv_ddlist_refr_size(lv_obj_t * ddlist, bool anim_en)
lv_ddlist_pos_current_option(ddlist);
if(ext->opened) lv_page_set_sb_mode(ddlist, LV_SB_MODE_UNHIDE);
#if LV_USE_ANIMATION
lv_anim_del(ddlist, (lv_anim_fp_t)lv_obj_set_height); /*If an animation is in progress then
lv_anim_del(ddlist, (lv_anim_fp_t)lv_ddlist_adjust_height); /*If an animation is in progress then
it will overwrite this changes*/
lv_ddlist_anim_cb(ddlist); /*Force animation complete to fix highlight selection*/
} else {
lv_anim_t a;
a.var = ddlist;