mirror of
https://github.com/lvgl/lvgl.git
synced 2026-05-26 11:07:34 +08:00
fix(obj): old parent's scroll is not updated in lv_obj_set_parent() (#2965)
This commit is contained in:
@@ -172,6 +172,8 @@ void lv_obj_set_parent(lv_obj_t * obj, lv_obj_t * parent)
|
||||
obj->parent = parent;
|
||||
|
||||
/*Notify the original parent because one of its children is lost*/
|
||||
lv_obj_readjust_scroll(old_parent, LV_ANIM_OFF);
|
||||
lv_obj_scrollbar_invalidate(old_parent);
|
||||
lv_event_send(old_parent, LV_EVENT_CHILD_CHANGED, obj);
|
||||
lv_event_send(old_parent, LV_EVENT_CHILD_DELETED, NULL);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user