From 0cd1f0ca39c351e13c0566e2b0aefc69eb56825a Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Fri, 24 Jan 2025 03:05:10 +0100 Subject: [PATCH] fix(layout): always recalculate teh layout if HIDDEN changes (#7607) --- src/core/lv_obj.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/core/lv_obj.c b/src/core/lv_obj.c index 31ba45fdb..706b71577 100644 --- a/src/core/lv_obj.c +++ b/src/core/lv_obj.c @@ -285,10 +285,8 @@ void lv_obj_remove_flag(lv_obj_t * obj, lv_obj_flag_t f) if(f & LV_OBJ_FLAG_HIDDEN) { lv_obj_invalidate(obj); - if(lv_obj_is_layout_positioned(obj)) { - lv_obj_mark_layout_as_dirty(lv_obj_get_parent(obj)); - lv_obj_mark_layout_as_dirty(obj); - } + lv_obj_mark_layout_as_dirty(lv_obj_get_parent(obj)); + lv_obj_mark_layout_as_dirty(obj); } if((was_on_layout != lv_obj_is_layout_positioned(obj)) || (f & (LV_OBJ_FLAG_LAYOUT_1 | LV_OBJ_FLAG_LAYOUT_2))) {