fix(layout) fix layout recalculation trigger in lv_obj_add/clear_fleg
This commit is contained in:
@@ -239,6 +239,7 @@ void lv_obj_add_flag(lv_obj_t * obj, lv_obj_flag_t f)
|
|||||||
|
|
||||||
if((was_on_layout != lv_obj_is_layout_positioned(obj)) || (f & (LV_OBJ_FLAG_LAYOUT_1 | LV_OBJ_FLAG_LAYOUT_2))) {
|
if((was_on_layout != lv_obj_is_layout_positioned(obj)) || (f & (LV_OBJ_FLAG_LAYOUT_1 | LV_OBJ_FLAG_LAYOUT_2))) {
|
||||||
lv_obj_mark_layout_as_dirty(lv_obj_get_parent(obj));
|
lv_obj_mark_layout_as_dirty(lv_obj_get_parent(obj));
|
||||||
|
lv_obj_mark_layout_as_dirty(obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(f & LV_OBJ_FLAG_SCROLLABLE) {
|
if(f & LV_OBJ_FLAG_SCROLLABLE) {
|
||||||
@@ -267,6 +268,7 @@ void lv_obj_clear_flag(lv_obj_t * obj, lv_obj_flag_t f)
|
|||||||
lv_obj_invalidate(obj);
|
lv_obj_invalidate(obj);
|
||||||
if(lv_obj_is_layout_positioned(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(lv_obj_get_parent(obj));
|
||||||
|
lv_obj_mark_layout_as_dirty(obj);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user