elm genlist: Fixed elm_genlist_item_index_get(). Patch by Chanwook
authorseoz <seoz@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 15 Mar 2012 10:12:59 +0000 (10:12 +0000)
committerseoz <seoz@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 15 Mar 2012 10:12:59 +0000 (10:12 +0000)
Jung <jchanwook@gmail.com> But this will never be correct without
performance issue.

On Thu, Mar 15, 2012 at 4:43 PM, chanwook jung <jchanwook@gmail.com>
wrote:
> Dear all,
>
> I made the patch to fix index bug.
>
> Thanks,
> Joey

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@69366 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/elm_genlist.c

index 6a49af9..55d6ade 100644 (file)
@@ -5183,7 +5183,7 @@ elm_genlist_item_index_get(const Elm_Object_Item *it)
    Elm_Gen_Item *_it = (Elm_Gen_Item *)it;
 
    if (_it->item->block)
-     return _it->position + _it->item->block->position;
+     return _it->position + (_it->item->block->position * _it->wd->max_items_per_block);
    return -1;
 }