mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-28 07:03:00 +08:00
fix(style): invalidate cache on every PART
Inherited properties on parts other than MAIN needs to be recached on property change beacuse they are inherted from MAIN fixes #1933
This commit is contained in:
parent
89eca30da8
commit
313f7f30a7
@ -4759,25 +4759,19 @@ static void invalidate_style_cache(lv_obj_t * obj, uint8_t part, lv_style_proper
|
||||
{
|
||||
if(style_prop_is_cacheble(prop) == false) return;
|
||||
|
||||
if(part != LV_OBJ_PART_ALL) {
|
||||
for(part = 0; part < _LV_OBJ_PART_REAL_FIRST; part++) {
|
||||
lv_style_list_t * list = lv_obj_get_style_list(obj, part);
|
||||
if(list == NULL) return;
|
||||
if(list == NULL) break;
|
||||
list->valid_cache = 0;
|
||||
}
|
||||
else {
|
||||
|
||||
for(part = 0; part < _LV_OBJ_PART_REAL_FIRST; part++) {
|
||||
lv_style_list_t * list = lv_obj_get_style_list(obj, part);
|
||||
if(list == NULL) break;
|
||||
list->valid_cache = 0;
|
||||
}
|
||||
for(part = _LV_OBJ_PART_REAL_FIRST; part < 0xFF; part++) {
|
||||
lv_style_list_t * list = lv_obj_get_style_list(obj, part);
|
||||
if(list == NULL) break;
|
||||
list->valid_cache = 0;
|
||||
}
|
||||
for(part = _LV_OBJ_PART_REAL_FIRST; part < 0xFF; part++) {
|
||||
lv_style_list_t * list = lv_obj_get_style_list(obj, part);
|
||||
if(list == NULL) break;
|
||||
list->valid_cache = 0;
|
||||
}
|
||||
|
||||
|
||||
lv_obj_t * child = lv_obj_get_child(obj, NULL);
|
||||
while(child) {
|
||||
update_style_cache_children(child);
|
||||
|
Loading…
x
Reference in New Issue
Block a user