If text_class in the textblock is changed, it is not applied because of the cache.
When text_class is changed, reset cache to update text information.
void _edje_textblock_styles_add(Edje *ed);
void _edje_textblock_styles_del(Edje *ed);
+void _edje_textblock_styles_cache_free(Edje *ed, const char *text_class);
void _edje_textblock_style_all_update(Edje *ed);
void _edje_textblock_style_parse_and_fix(Edje_File *edf);
void _edje_textblock_style_cleanup(Edje_File *edf);
}
}
+void
+_edje_textblock_styles_cache_free(Edje *ed, const char *text_class)
+{
+ Eina_List *l, *ll;
+ Edje_Style *stl;
+
+ if (!ed->file) return;
+ if (!text_class) return;
+
+ EINA_LIST_FOREACH(ed->file->styles, l, stl)
+ {
+ Edje_Style_Tag *tag;
+ Eina_Bool found = EINA_FALSE;
+
+ EINA_LIST_FOREACH(stl->tags, ll, tag)
+ {
+ if (!tag->text_class) continue;
+
+ if (!strcmp(tag->text_class, text_class))
+ {
+ found = EINA_TRUE;
+ break;
+ }
+ }
+ if (found)
+ stl->cache = EINA_FALSE;
+ }
+}
+
/* When we get to here the edje file had been read into memory
* the name of the style is established as well as the name and
* data for the tags. This function will create the Evas_Style
ed = eina_list_data_get(members);
ed->dirty = EINA_TRUE;
ed->recalc_call = EINA_TRUE;
+ _edje_textblock_styles_cache_free(ed, text_class);
_edje_textblock_style_all_update(ed);
#ifdef EDJE_CALC_CACHE
ed->text_part_change = EINA_TRUE;
ed = eina_list_data_get(members);
ed->dirty = EINA_TRUE;
+ _edje_textblock_styles_cache_free(ed, text_class);
_edje_textblock_style_all_update(ed);
#ifdef EDJE_CALC_CACHE
ed->text_part_change = EINA_TRUE;
#ifdef EDJE_CALC_CACHE
ed->text_part_change = EINA_TRUE;
#endif
+ _edje_textblock_styles_cache_free(ed, text_class);
_edje_textblock_style_all_update(ed);
_edje_recalc(ed);
if (ret) *ret = EINA_TRUE;