From 3a67cb62daa4c2b55da45ab433deb2fb737d91fb Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Wed, 17 Aug 2022 12:51:36 +0200 Subject: [PATCH] fix(style): add missing invalidation in lv_obj_remove_local_style_prop fixes #3581 --- src/core/lv_obj_style.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/core/lv_obj_style.c b/src/core/lv_obj_style.c index a761f8046d..f558115910 100644 --- a/src/core/lv_obj_style.c +++ b/src/core/lv_obj_style.c @@ -315,7 +315,12 @@ bool lv_obj_remove_local_style_prop(lv_obj_t * obj, lv_style_prop_t prop, lv_sty /*The style is not found*/ if(i == obj->style_cnt) return false; - return lv_style_remove_prop((lv_style_t *)obj->styles[i].style, prop); + lv_res_t res = lv_style_remove_prop((lv_style_t *)obj->styles[i].style, prop); + if(res == LV_RES_OK) { + lv_obj_refresh_style(obj, selector, prop); + } + + return res; } void _lv_obj_style_create_transition(lv_obj_t * obj, lv_part_t part, lv_state_t prev_state, lv_state_t new_state,