From 2ab3397aa61a1956317f09b206cfc15939ed9f86 Mon Sep 17 00:00:00 2001 From: hermet Date: Thu, 9 Jun 2011 08:36:55 +0000 Subject: [PATCH] elementary/list - avoid unnecessary checking when deleting sub-objects git-svn-id: https://svn.enlightenment.org/svn/e/trunk/elementary@60120 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/lib/elm_list.c | 33 +++++++++++++++------------------ 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/src/lib/elm_list.c b/src/lib/elm_list.c index 7158365..6989969 100644 --- a/src/lib/elm_list.c +++ b/src/lib/elm_list.c @@ -659,28 +659,25 @@ _sub_del(void *data __UNUSED__, Evas_Object *obj, void *event_info) if (!wd) return; if (!sub) abort(); - if (sub == wd->scr) - wd->scr = NULL; - else + if ((sub == wd->box) || (sub == wd->scr)) return; + + EINA_LIST_FOREACH(wd->items, l, it) { - EINA_LIST_FOREACH(wd->items, l, it) + if ((sub == it->icon) || (sub == it->end)) { - if ((sub == it->icon) || (sub == it->end)) + if (it->icon == sub) it->icon = NULL; + if (it->end == sub) it->end = NULL; + evas_object_event_callback_del_full + (sub, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _changed_size_hints, + obj); + if (!wd->walking) { - if (it->icon == sub) it->icon = NULL; - if (it->end == sub) it->end = NULL; - evas_object_event_callback_del_full - (sub, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _changed_size_hints, - obj); - if (!wd->walking) - { - _fix_items(obj); - _sizing_eval(obj); - } - else - wd->fix_pending = EINA_TRUE; - break; + _fix_items(obj); + _sizing_eval(obj); } + else + wd->fix_pending = EINA_TRUE; + break; } } } -- 2.7.4