From: sachiel Date: Wed, 28 Apr 2010 18:40:05 +0000 (+0000) Subject: When changing source of a GROUP part, set/clean the swallowed_object, by Thiago Masaki X-Git-Tag: submit/2.0alpha-wayland/20121127.221958~1300 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b83d14580c0c886a5183728f49225bfc0e70d53d;p=profile%2Fivi%2Fedje.git When changing source of a GROUP part, set/clean the swallowed_object, by Thiago Masaki git-svn-id: http://svn.enlightenment.org/svn/e/trunk/edje@48398 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/lib/edje_edit.c b/src/lib/edje_edit.c index 4cee6de..00e436f 100644 --- a/src/lib/edje_edit.c +++ b/src/lib/edje_edit.c @@ -2449,6 +2449,7 @@ edje_edit_part_source_set(Evas_Object *obj, const char *part, const char *source { GET_RP_OR_RETURN(0); + Evas_Object *child_obj; //printf("Set source for part: %s [source: %s]\n", part, source); if (rp->part->type == EDJE_PART_TYPE_EXTERNAL) @@ -2456,8 +2457,19 @@ edje_edit_part_source_set(Evas_Object *obj, const char *part, const char *source _edje_if_string_free(ed, rp->part->source); + if (rp->swallowed_object) + { + _edje_real_part_swallow_clear(rp); + evas_object_del(rp->swallowed_object); + rp->swallowed_object = NULL; + } if (source) - rp->part->source = eina_stringshare_add(source); + { + rp->part->source = eina_stringshare_add(source); + child_obj = edje_object_add(ed->evas); + edje_object_file_set(child_obj, ed->file->path, source); + _edje_real_part_swallow(rp, child_obj); + } else rp->part->source = NULL; return 1;