From: Tae-Hwan Kim Date: Mon, 29 Jul 2013 11:40:09 +0000 (+0900) Subject: [Genlist] Remove contents eventhouhgh content get retruns NULL. X-Git-Tag: 2.2_release~20 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c6557fdb6a4529c1b52561f2004de25b15c7b307;p=framework%2Fuifw%2Felementary.git [Genlist] Remove contents eventhouhgh content get retruns NULL. So application can remove the contents by using NULL Change-Id: Ibd2957805f6ac39757ed1cd379fa12d184b18463 --- diff --git a/src/lib/elm_genlist.c b/src/lib/elm_genlist.c index acf0480..1da0633 100644 --- a/src/lib/elm_genlist.c +++ b/src/lib/elm_genlist.c @@ -665,18 +665,18 @@ _item_content_realize(Elm_Gen_Item *it, if (parts && fnmatch(parts, key, FNM_PERIOD)) continue; + Evas_Object *old = edje_object_part_swallow_get(target, key); + if (old) + { + contents = eina_list_remove(contents, old); + evas_object_del(old); + } + if (it->itc->func.content_get) ic = it->itc->func.content_get ((void *)it->base.data, WIDGET(it), key); if (ic) { - Evas_Object *c = edje_object_part_swallow_get(target, key); - if (c) - { - contents = eina_list_remove(contents, c); - evas_object_del(c); - } - if (!edje_object_part_swallow(target, key, ic)) { WRN("%s (%p) can not be swallowed into %s",