1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-28 07:03:00 +08:00

Warn if lv_obj_set_pos is called on a screen object

This commit is contained in:
embeddedt 2020-02-11 08:42:04 -05:00 committed by GitHub
parent 43a06b41be
commit b9697df3a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -725,6 +725,11 @@ void lv_obj_set_pos(lv_obj_t * obj, lv_coord_t x, lv_coord_t y)
/*Convert x and y to absolute coordinates*/
lv_obj_t * par = obj->par;
if(par == NULL) {
LV_LOG_WARN("lv_obj_set_pos: not changing position of screen object");
return;
}
x = x + par->coords.x1;
y = y + par->coords.y1;