Edje text_class: Unified the _object_text_class_set code a bit more.
There were two code paths, with one missing a couple of calls. Now there's less code duplication and less bugs. SVN revision: 73604
This commit is contained in:
parent
ae1d0e3a9b
commit
9aaa7690f7
|
@ -907,7 +907,7 @@ edje_object_text_class_set(Evas_Object *obj, const char *text_class, const char
|
|||
{
|
||||
Edje *ed;
|
||||
Eina_List *l;
|
||||
Edje_Text_Class *tc;
|
||||
Edje_Text_Class *tc = NULL;
|
||||
unsigned int i;
|
||||
|
||||
ed = _edje_fetch(obj);
|
||||
|
@ -927,18 +927,12 @@ edje_object_text_class_set(Evas_Object *obj, const char *text_class, const char
|
|||
/* Update new text class properties */
|
||||
eina_stringshare_replace(&tc->font, font);
|
||||
tc->size = size;
|
||||
|
||||
/* Update edje */
|
||||
ed->dirty = 1;
|
||||
ed->recalc_call = 1;
|
||||
#ifdef EDJE_CALC_CACHE
|
||||
ed->text_part_change = 1;
|
||||
#endif
|
||||
_edje_recalc(ed);
|
||||
return EINA_TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!tc)
|
||||
{
|
||||
/* No matches, create a new text class */
|
||||
tc = calloc(1, sizeof(Edje_Text_Class));
|
||||
if (!tc) return EINA_FALSE;
|
||||
|
@ -950,6 +944,7 @@ edje_object_text_class_set(Evas_Object *obj, const char *text_class, const char
|
|||
}
|
||||
tc->font = eina_stringshare_add(font);
|
||||
tc->size = size;
|
||||
}
|
||||
|
||||
for (i = 0; i < ed->table_parts_size; i++)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue