From 519b782ff297ddacd03b34d5d20ca90f0d9b5861 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Andre Date: Thu, 23 Feb 2017 16:45:29 +0900 Subject: [PATCH] Revert "elm_genlist: when appending items to the parent, prepend to the parent" This reverts commit 43d82e567a2d655a089b6ca3f2d913e6ec52f1dc. I don't understand this commit. It broke the logical order of items, as the internal list wouldn't match the order on screen. Other places in the code didn't seem to make this assumption that parents come after their children. And for sure my recent fixes require the parent to come before. This commit was one of the many reasons why odd/even styles look often wrong. See T3086 --- src/lib/elementary/elm_genlist.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/lib/elementary/elm_genlist.c b/src/lib/elementary/elm_genlist.c index 7d6370a355..1404f41ae0 100644 --- a/src/lib/elementary/elm_genlist.c +++ b/src/lib/elementary/elm_genlist.c @@ -6266,12 +6266,8 @@ _elm_genlist_item_append(Eo *obj EINA_UNUSED, Elm_Genlist_Data *sd, const Elm_Ge eina_list_append(it->parent->item->items, EO_OBJ(it)); if (!eo_it2) eo_it2 = EO_OBJ(it->parent); ELM_GENLIST_ITEM_DATA_GET(eo_it2, it2); - if (eo_it2 == EO_OBJ(it->parent)) - sd->items = eina_inlist_prepend_relative - (sd->items, EINA_INLIST_GET(it), EINA_INLIST_GET(it2)); - else - sd->items = eina_inlist_append_relative - (sd->items, EINA_INLIST_GET(it), EINA_INLIST_GET(it2)); + sd->items = eina_inlist_append_relative + (sd->items, EINA_INLIST_GET(it), EINA_INLIST_GET(it2)); it->item->rel = it2; it2->item->rel_revs = eina_list_append(it2->item->rel_revs, it); _item_expanded_set_noevent(it->parent, EINA_TRUE);