sanghyeonlee pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=a575db8c64eea4553c4e719b95de2eccb29d239c

commit a575db8c64eea4553c4e719b95de2eccb29d239c
Author: SangHyeon Lee <sh10233....@samsung.com>
Date:   Fri Jan 22 16:55:37 2016 +0900

    genlist : fix tree item floating issue when homoegeneous mode is enabled
    
    genlist item is flaoting upon the expanded item when homoegeneous mode
    is enabled.
    when item block is recalculated by tree expanding, new item didn't
    update their properties and values becuase of size hash, but edc
    actaully need to be recaculated after swallowing tree size padding.
    
    solve the issue by adding expand depth check in size hash.
    
    you can check the previous issue in T2708
    elementary_test->genlist tree->homoegeneous check
    
    @fix
---
 src/lib/elm_genlist.c        | 7 +++++--
 src/lib/elm_widget_genlist.h | 7 ++++---
 2 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/src/lib/elm_genlist.c b/src/lib/elm_genlist.c
index b78081f..de720cf 100644
--- a/src/lib/elm_genlist.c
+++ b/src/lib/elm_genlist.c
@@ -1829,6 +1829,7 @@ _item_realize(Elm_Gen_Item *it,
      {
         GL_IT(it)->w = GL_IT(it)->minw = size->minw;
         GL_IT(it)->h = GL_IT(it)->minh = size->minh;
+        size->expanded_depth = it->item->expanded_depth;
         it->item->mincalcd = EINA_TRUE;
      }
    else
@@ -1880,6 +1881,7 @@ _item_realize(Elm_Gen_Item *it,
 
                        size = ELM_NEW(Item_Size);
                        size->itc = it->itc;
+                       size->expanded_depth = it->item->expanded_depth;
                        size->minw = mw;
                        size->minh = mh;
                        eina_hash_add(sd->size_caches, &(it->itc), size);
@@ -5099,7 +5101,7 @@ _item_block_recalc(Item_Block *itb,
                   if (!it->item->mincalcd) changed = EINA_TRUE;
                   if (changed)
                     {
-                       if (!size)
+                       if (!size || (it->item->expanded_depth != 
size->expanded_depth))
                          {
                             _item_realize(it, in, EINA_TRUE);
                             _elm_genlist_item_unrealize(it, EINA_TRUE);
@@ -5115,6 +5117,7 @@ _item_block_recalc(Item_Block *itb,
              else
                {
                   if ((itb->sd->homogeneous) && size &&
+                      (it->item->expanded_depth == size->expanded_depth) &&
                       (itb->sd->mode == ELM_LIST_COMPRESS))
                     {
                        it->item->w = it->item->minw = size->minw;
@@ -5155,7 +5158,7 @@ _update_job(void *data)
    Eina_Bool position = EINA_FALSE, recalc = EINA_FALSE;
    ELM_GENLIST_DATA_GET(data, sd);
    Item_Block *itb;
-   Eina_List *l2;
+  Eina_List *l2;
    int num, num0;
 
    sd->update_job = NULL;
diff --git a/src/lib/elm_widget_genlist.h b/src/lib/elm_widget_genlist.h
index 71f613c..27f9271 100644
--- a/src/lib/elm_widget_genlist.h
+++ b/src/lib/elm_widget_genlist.h
@@ -281,9 +281,10 @@ struct _Item_Cache
 
 struct _Item_Size
 {
-     const Elm_Genlist_Item_Class *itc;
-     Evas_Coord minw;
-     Evas_Coord minh;
+   const Elm_Genlist_Item_Class *itc;
+   Evas_Coord minw;
+   Evas_Coord minh;
+   int expanded_depth;
 };
 
 typedef struct _Elm_Genlist_Pan_Data Elm_Genlist_Pan_Data;

-- 


Reply via email to