forked from enlightenment/efl
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
This commit is contained in:
parent
b959139213
commit
2f5b83982f
|
@ -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));
|
||||
|
|
Loading…
Reference in New Issue