From 4121fb28d59a22e23d4fdf619ec7a586ba70f23b Mon Sep 17 00:00:00 2001 From: Daniel Juyung Seo Date: Mon, 4 Mar 2013 20:29:44 +0900 Subject: [PATCH] elm elm_gengrid.c: Optimize item count calculation when an item is appended. Patch by Junki Cho Do not need to calculate the list count when a gengrid item is appended. Just use item_count which was already calculated. --- src/lib/elm_gengrid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/elm_gengrid.c b/src/lib/elm_gengrid.c index 78c0954..7973578 100644 --- a/src/lib/elm_gengrid.c +++ b/src/lib/elm_gengrid.c @@ -2708,7 +2708,7 @@ _item_append(Eo *obj EINA_UNUSED, void *_pd, va_list *list) if (!it) return; sd->items = eina_inlist_append(sd->items, EINA_INLIST_GET(it)); - it->position = eina_inlist_count(sd->items); + it->position = sd->item_count; it->position_update = EINA_TRUE; if (it->group) -- 2.7.4