summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrii Kroitor <an.kroitor@samsung.com>2015-08-28 20:18:23 +0900
committerChunEon Park <hermet@hermet.pe.kr>2015-08-28 20:18:23 +0900
commit1cda2d76d8db1c083379ab83493942b0aa09a28e (patch)
tree52b67f276b20607a0366c1c69699192923d83845
parentb75c194e6a08ca5d9e66d41bf801269526686b74 (diff)
elm_genlist: fix sub-items prepending
Summary: fix sub-item position after prepending if parent item has no other sub-items Test Plan: 1. add genlist 2. add parent item 3. compare results of following actions: case 1: append sub-item "child1" and then prepend sub-item "child2" case 2: prepend sub-item "child2" and then append sub-item "child1" ExR results are the same CuR in case 2 sub-items are placed in wrong position Reviewers: cedric, raster, reutskiy.v.v, SanghyeonLee, Hermet Reviewed By: Hermet Differential Revision: https://phab.enlightenment.org/D2965
-rw-r--r--src/lib/elm_genlist.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lib/elm_genlist.c b/src/lib/elm_genlist.c
index c27f429a8..687040f0d 100644
--- a/src/lib/elm_genlist.c
+++ b/src/lib/elm_genlist.c
@@ -6112,6 +6112,9 @@ _elm_genlist_item_prepend(Eo *obj EINA_UNUSED, Elm_Genlist_Data *sd, const Elm_G
6112 ELM_GENLIST_ITEM_DATA_GET(eo_parent, parent); 6112 ELM_GENLIST_ITEM_DATA_GET(eo_parent, parent);
6113 ELM_GENLIST_ITEM_CHECK_OR_RETURN(parent, NULL); 6113 ELM_GENLIST_ITEM_CHECK_OR_RETURN(parent, NULL);
6114 EINA_SAFETY_ON_FALSE_RETURN_VAL((obj == WIDGET(parent)), NULL); 6114 EINA_SAFETY_ON_FALSE_RETURN_VAL((obj == WIDGET(parent)), NULL);
6115 /* first sub-item should allways be appended */
6116 if (!parent->item->items)
6117 return _elm_genlist_item_append(obj, sd, itc, data, eo_parent, type, func, func_data);
6115 } 6118 }
6116 6119
6117 it = _elm_genlist_item_new 6120 it = _elm_genlist_item_new