From dfc3f7ac30da8e8c85bd37f054e582f229cc165f Mon Sep 17 00:00:00 2001 From: Daniel Zaoui Date: Sun, 23 Nov 2014 09:18:42 +0200 Subject: [PATCH] Genlist: Fix previous commit. The items of an item is a list of Elm_Object_Item and not of Elm_Gen_Item. Sorry @zmike ;-) Fixes T1859 Another fix has been added in this commit, related to relative items. --- legacy/elementary/src/lib/elm_genlist.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/legacy/elementary/src/lib/elm_genlist.c b/legacy/elementary/src/lib/elm_genlist.c index 4cd9c224c2..39a813a867 100644 --- a/legacy/elementary/src/lib/elm_genlist.c +++ b/legacy/elementary/src/lib/elm_genlist.c @@ -3426,7 +3426,7 @@ _item_del(Elm_Gen_Item *it) evas_event_freeze(evas_object_evas_get(obj)); // FIXME: relative will be better to be fixed. it is too harsh. - if (it->item->rel) + if (it->item->rel && it->item->rel->item) it->item->rel->item->rel_revs = eina_list_remove(it->item->rel->item->rel_revs, it); if (it->item->rel_revs) @@ -6069,6 +6069,7 @@ _elm_genlist_item_sorted_insert(Eo *obj EINA_UNUSED, Elm_Genlist_Data *sd, const if (it->parent) { + Elm_Object_Item *eo_rel = NULL; Eina_List *l; int cmp_result; @@ -6078,7 +6079,8 @@ _elm_genlist_item_sorted_insert(Eo *obj EINA_UNUSED, Elm_Genlist_Data *sd, const if (l) { - rel = eina_list_data_get(l); + eo_rel = eina_list_data_get(l); + rel = eo_data_scope_get(eo_rel, ELM_GENLIST_ITEM_CLASS); if (cmp_result >= 0) {