fix(obj) be sure the slef size is refreshed when an obejct is created

This commit is contained in:
Gabor Kiss-Vamosi
2021-05-02 22:16:38 +02:00
parent b76efce8a8
commit 22fa87a58e
+2 -1
View File
@@ -94,7 +94,6 @@ lv_obj_t * lv_obj_create_from_class(const lv_obj_class_t * class_p, lv_obj_t * p
}
}
lv_obj_mark_layout_as_dirty(obj);
lv_obj_enable_style_refresh(false);
@@ -104,6 +103,8 @@ lv_obj_t * lv_obj_create_from_class(const lv_obj_class_t * class_p, lv_obj_t * p
lv_obj_enable_style_refresh(true);
lv_obj_refresh_style(obj, LV_PART_ANY, LV_STYLE_PROP_ANY);
lv_obj_refresh_self_size(obj);
lv_group_t * def_group = lv_group_get_default();
if(def_group && lv_obj_is_group_def(obj)) {