fix(obj): old parent's scroll is not updated in lv_obj_set_parent() (#2965)

This commit is contained in:
guoweilkd
2022-01-07 04:56:53 +08:00
committed by GitHub
parent 6b841555cd
commit e00b51b04f
+2
View File
@@ -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);