From fb0d1a4f573f9690ed20c0b7c186da2292ee4a23 Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Tue, 7 Aug 2012 11:15:30 +0000 Subject: [PATCH] 2 bugs. 1 textclasses were repeated per object list and (segv free same tc 2x) 2. we returend if size OR font name match - BOTH have to match to be "the same". so && not || SVN revision: 74980 --- legacy/edje/src/lib/edje_util.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/legacy/edje/src/lib/edje_util.c b/legacy/edje/src/lib/edje_util.c index 8fab2562d4..d207eca865 100644 --- a/legacy/edje/src/lib/edje_util.c +++ b/legacy/edje/src/lib/edje_util.c @@ -919,9 +919,9 @@ edje_object_text_class_set(Evas_Object *obj, const char *text_class, const char if ((tc->name) && (!strcmp(tc->name, text_class))) { /* Match and the same, return */ - if ((tc->size == size) || - (tc->font == font) || - (tc->font && font && !strcmp(tc->font, font))) + if ((tc->size == size) && + ((tc->font == font) || + (tc->font && font && !strcmp(tc->font, font)))) return EINA_TRUE; /* Update new text class properties */ @@ -944,6 +944,8 @@ edje_object_text_class_set(Evas_Object *obj, const char *text_class, const char } tc->font = eina_stringshare_add(font); tc->size = size; + /* Add to edje's text class list */ + ed->text_classes = eina_list_append(ed->text_classes, tc); } for (i = 0; i < ed->table_parts_size; i++) @@ -956,8 +958,6 @@ edje_object_text_class_set(Evas_Object *obj, const char *text_class, const char font, size); } - /* Add to edje's text class list */ - ed->text_classes = eina_list_append(ed->text_classes, tc); ed->dirty = 1; ed->recalc_call = 1; #ifdef EDJE_CALC_CACHE