summaryrefslogtreecommitdiff
path: root/src/lib/elementary
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2017-02-23 16:45:29 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-02-27 09:26:41 +0900
commit519b782ff297ddacd03b34d5d20ca90f0d9b5861 (patch)
treedfc16695307dfd752aefddd865fab2f74d4fc850 /src/lib/elementary
parent254ff7926b271ca8825dae7f370544f9c669df1a (diff)
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
Diffstat (limited to 'src/lib/elementary')
-rw-r--r--src/lib/elementary/elm_genlist.c8
1 files 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
6266 eina_list_append(it->parent->item->items, EO_OBJ(it)); 6266 eina_list_append(it->parent->item->items, EO_OBJ(it));
6267 if (!eo_it2) eo_it2 = EO_OBJ(it->parent); 6267 if (!eo_it2) eo_it2 = EO_OBJ(it->parent);
6268 ELM_GENLIST_ITEM_DATA_GET(eo_it2, it2); 6268 ELM_GENLIST_ITEM_DATA_GET(eo_it2, it2);
6269 if (eo_it2 == EO_OBJ(it->parent)) 6269 sd->items = eina_inlist_append_relative
6270 sd->items = eina_inlist_prepend_relative 6270 (sd->items, EINA_INLIST_GET(it), EINA_INLIST_GET(it2));
6271 (sd->items, EINA_INLIST_GET(it), EINA_INLIST_GET(it2));
6272 else
6273 sd->items = eina_inlist_append_relative
6274 (sd->items, EINA_INLIST_GET(it), EINA_INLIST_GET(it2));
6275 it->item->rel = it2; 6271 it->item->rel = it2;
6276 it2->item->rel_revs = eina_list_append(it2->item->rel_revs, it); 6272 it2->item->rel_revs = eina_list_append(it2->item->rel_revs, it);
6277 _item_expanded_set_noevent(it->parent, EINA_TRUE); 6273 _item_expanded_set_noevent(it->parent, EINA_TRUE);