From: Cedric BAIL Date: Fri, 2 Dec 2011 16:00:41 +0000 (+0000) Subject: elementary: prevent early death of items. X-Git-Tag: v1.0.0~1463 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bf94bcc2b1e9cb5aa253280d6f276923418c7f3e;p=platform%2Fupstream%2Felementary.git elementary: prevent early death of items. SVN revision: 65824 --- diff --git a/src/lib/elm_genlist.c b/src/lib/elm_genlist.c index 62aef74..c11da64 100644 --- a/src/lib/elm_genlist.c +++ b/src/lib/elm_genlist.c @@ -3789,7 +3789,12 @@ _elm_genlist_clear(Evas_Object *obj, Eina_Bool standby) if (it->generation < wd->generation) { + Elm_Gen_Item *itn = NULL; + + if (next) itn = ELM_GEN_ITEM_FROM_INLIST(next); + if (itn) itn->walking++; /* prevent early death of subitem */ it->del_cb(it); + if (itn) itn->walking--; } } wd->clear_me = 0; @@ -4337,6 +4342,11 @@ elm_genlist_item_del(Elm_Gen_Item *it) if (it->wd->calc_job) ecore_job_del(it->wd->calc_job); it->wd->calc_job = ecore_job_add(_calc_job, it->wd); } + if (it->parent) + { + it->parent->item->items = eina_list_remove(it->parent->item->items, it); + it->parent = NULL; + } return; } _item_del(it);