From 9318e02ef5e29d2f6ce0ab4b2aa67c6542752822 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Mon, 25 Oct 2021 19:09:28 +0200 Subject: [PATCH] fix(scroll) in scroll to view functions respect disabled LV_OBJ_FLAG_SCROLLABLE fixes #2730 --- src/core/lv_obj_scroll.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/core/lv_obj_scroll.c b/src/core/lv_obj_scroll.c index 6641c5819..0b2a5d26e 100644 --- a/src/core/lv_obj_scroll.c +++ b/src/core/lv_obj_scroll.c @@ -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;