rimmed pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=287f84baaff605ce7b1c838720b68749c62c3c4b

commit 287f84baaff605ce7b1c838720b68749c62c3c4b
Author: Vyacheslav Reutskiy <v.reuts...@samsung.com>
Date:   Tue Apr 26 15:12:14 2016 +0300

    elm_genlist: fix the sorted insert after expanded tree item
    
    Insert a new item after subitem of ELM_GENLIST_ITEM_TREE item, if
    it expanded.
    
    @fix
---
 src/lib/elementary/elm_genlist.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/lib/elementary/elm_genlist.c b/src/lib/elementary/elm_genlist.c
index cb77a88..378c5f0 100644
--- a/src/lib/elementary/elm_genlist.c
+++ b/src/lib/elementary/elm_genlist.c
@@ -6384,7 +6384,7 @@ _elm_genlist_item_sorted_insert(Eo *obj, Elm_Genlist_Data 
*sd, const Elm_Genlist
    if (it->parent)
      {
         Elm_Object_Item *eo_rel = NULL;
-        Eina_List *l;
+        Eina_List *l, *last;
         int cmp_result;
 
         l = eina_list_search_sorted_near_list
@@ -6408,6 +6408,12 @@ _elm_genlist_item_sorted_insert(Eo *obj, 
Elm_Genlist_Data *sd, const Elm_Genlist
                {
                   it->parent->item->items = eina_list_append_relative_list
                       (it->parent->item->items, eo_it, l);
+                  if (rel->item->items && rel->item->expanded)
+                    {
+                       last = eina_list_last(rel->item->items);
+                       eo_rel = eina_list_data_get(last);
+                       rel = eo_data_scope_get(eo_rel, ELM_GENLIST_ITEM_CLASS);
+                    }
                   sd->items = eina_inlist_append_relative
                       (sd->items, EINA_INLIST_GET(it), EINA_INLIST_GET(rel));
                   it->item->before = EINA_FALSE;

-- 


Reply via email to