diff --git a/src/lv_core/lv_obj.c b/src/lv_core/lv_obj.c index ae1259995..5956bf4a7 100644 --- a/src/lv_core/lv_obj.c +++ b/src/lv_core/lv_obj.c @@ -741,7 +741,9 @@ void lv_obj_set_state(lv_obj_t * obj, lv_state_t new_state) } } if(cmp_res == _LV_STYLE_STATE_CMP_VISUAL_DIFF) { +#if LV_STYLE_CACHE_LEVEL > 0 _lv_obj_invalidate_style_cache(obj, part, LV_STYLE_PROP_ALL); +#endif } }