From: raster Date: Mon, 31 Jan 2011 08:30:11 +0000 (+0000) Subject: From: Daniel Juyung Seo X-Git-Tag: REL_F_I9500_20120323_1~17^2~3221 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=98218b3260fc5dbd323b4a8af284099285a113e6;p=framework%2Fuifw%2Felementary.git From: Daniel Juyung Seo Subject: [E-devel] [Patch] elm_genlist patch for group index handling and bug fix I attached a small patch for elm_genlist.c 1. _item_block_position() fix This patch realizes group index even there is no sub-items. There was a request about this. And it shows that there is no sub-items explicitly. 2. Bug Fix Null check routine was wrong-placed. I fixed it. git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@56573 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/lib/elm_genlist.c b/src/lib/elm_genlist.c index b162574..5020233 100644 --- a/src/lib/elm_genlist.c +++ b/src/lib/elm_genlist.c @@ -1997,10 +1997,10 @@ _item_block_position(Item_Block *itb, it->scrl_x = itb->x + it->x - it->wd->pan_x + ox; it->scrl_y = itb->y + it->y - it->wd->pan_y + oy; + vis = (ELM_RECTS_INTERSECT(it->scrl_x, it->scrl_y, it->w, it->h, + cvx, cvy, cvw, cvh)); if (it->flags != ELM_GENLIST_ITEM_GROUP) { - vis = (ELM_RECTS_INTERSECT(it->scrl_x, it->scrl_y, it->w, it->h, - cvx, cvy, cvw, cvh)); if ((itb->realized) && (!it->realized)) { if (vis) _item_realize(it, in, 0); @@ -2030,6 +2030,10 @@ _item_block_position(Item_Block *itb, } in++; } + else + { + if (vis) it->want_realize = EINA_TRUE; + } y += it->h; } } @@ -3425,9 +3429,9 @@ elm_genlist_last_item_get(const Evas_Object *obj) { ELM_CHECK_WIDTYPE(obj, widtype) NULL; Widget_Data *wd = elm_widget_data_get(obj); + if (!wd) return NULL; if (!wd->items) return NULL; Elm_Genlist_Item *it = ELM_GENLIST_ITEM_FROM_INLIST(wd->items->last); - if (!wd) return NULL; while ((it) && (it->delete_me)) it = ELM_GENLIST_ITEM_FROM_INLIST(EINA_INLIST_GET(it)->prev); return it;