raster pushed a commit to branch master.

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

commit 61daf57bb04e25cb74740372025778eabb559695
Author: Jaeun Choi <jaeun12.c...@samsung.com>
Date:   Fri Nov 8 18:11:06 2013 +0900

    bug fix: clear index omit info for omit disabled case as well
    
    Summary:
    In the original code, omit related information was cleared and recalculated
    only when omit function was enabled. So dynamic omit mode change didn't 
work in elementary_test.
    The information should be cleared everytime the index box is filled. fixed 
it.
    
    Test Plan: None
    
    Reviewers: seoz, Hermet, raster
    
    CC: raster
    
    Differential Revision: https://phab.enlightenment.org/D262
---
 src/lib/elm_index.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/src/lib/elm_index.c b/src/lib/elm_index.c
index 1cf2a7a..153a052 100644
--- a/src/lib/elm_index.c
+++ b/src/lib/elm_index.c
@@ -139,16 +139,6 @@ _omit_calc(void *data, int num_of_items, int 
max_num_of_items)
    Elm_Index_Item *it;
    Eina_List *l;
 
-   EINA_LIST_FREE(sd->omit, o)
-     free(o);
-
-   EINA_LIST_FOREACH(sd->items, l, it)
-     {
-        if (it->omitted)
-          it->omitted = eina_list_free(it->omitted);
-        if (it->head) it->head = NULL;
-     }
-
    if ((max_num_of_items < 3) || (num_of_items <= max_num_of_items)) return;
 
    max_group_num = (max_num_of_items - 1) / 2;
@@ -220,6 +210,16 @@ _index_box_auto_fill(Evas_Object *obj,
 
    rtl = elm_widget_mirrored_get(obj);
 
+   EINA_LIST_FREE(sd->omit, om)
+     free(om);
+
+   EINA_LIST_FOREACH(sd->items, l, it)
+     {
+        if (it->omitted)
+          it->omitted = eina_list_free(it->omitted);
+        if (it->head) it->head = NULL;
+     }
+
    if (sd->omit_enabled)
      {
         o = edje_object_add(evas_object_evas_get(obj));

-- 


Reply via email to