From 90be42c4931039a63821b7bd0e9e6a65bc563f44 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sat, 8 Aug 2020 16:21:51 +0200 Subject: [PATCH] Fix setting local style property multiple times Realted to https://forum.lvgl.io/t/how-to-change-button-object-color-on-demand/2922/2 --- CHANGELOG.md | 1 + src/lv_core/lv_style.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2a92f840d..28a0c4fac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ - Rename `lv_chart_clear_serie` to `lv_chart_clear_series` and `lv_obj_align_origo` to `lv_obj_align_mid` - Add linemeter's mirror feature again - Fix text decor (udnerline strikethrough) with older versions of font converter +- Fix setting local style property multiple times ## v7.3.0 (04.08.2020) diff --git a/src/lv_core/lv_style.c b/src/lv_core/lv_style.c index df1debc4d..887c4733b 100644 --- a/src/lv_core/lv_style.c +++ b/src/lv_core/lv_style.c @@ -1104,7 +1104,7 @@ static lv_style_t * get_alloc_local_style(lv_style_list_t * list) { LV_ASSERT_STYLE_LIST(list); - if(list->has_local) return lv_style_list_get_style(list, 0); + if(list->has_local) return lv_style_list_get_style(list, list->has_trans ? 1 : 0); lv_style_t * local_style = lv_mem_alloc(sizeof(lv_style_t)); LV_ASSERT_MEM(local_style);