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

fix(scroll) in scroll to view functions respect disabled LV_OBJ_FLAG_SCROLLABLE

fixes #2730
This commit is contained in:
Gabor Kiss-Vamosi 2021-10-25 19:09:28 +02:00
parent 0bab4a72cf
commit 9318e02ef5

View File

@ -646,6 +646,8 @@ static void scroll_area_into_view(const lv_area_t * area, lv_obj_t * child, lv_p
lv_anim_enable_t anim_en)
{
lv_obj_t * parent = lv_obj_get_parent(child);
if(!lv_obj_has_flag(parent, LV_OBJ_FLAG_SCROLLABLE)) return;
lv_dir_t scroll_dir = lv_obj_get_scroll_dir(parent);
lv_coord_t snap_goal = 0;
lv_coord_t act = 0;