aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLarry Jr <larry.olj@gmail.com>2017-08-04 13:35:11 -0300
committerLarry Jr <larry.olj@gmail.com>2017-08-04 13:35:11 -0300
commit9067b5d6d3c030e883bf319e4f5ff505f13e3ae1 (patch)
tree666274b9be71995cc544388185973bc37d2da224
parentElementary: Efl_Ui_List and efl_ui_list_example1 use Efl_Ui_Layout_Factory (diff)
downloadefl-9067b5d6d3c030e883bf319e4f5ff505f13e3ae1.tar.gz
elementary revert layout recycle in efl_ui_list
-rw-r--r--src/lib/elementary/efl_ui_list.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/lib/elementary/efl_ui_list.c b/src/lib/elementary/efl_ui_list.c
index 37aae08fc4..a281e3f1a0 100644
--- a/src/lib/elementary/efl_ui_list.c
+++ b/src/lib/elementary/efl_ui_list.c
@@ -532,11 +532,11 @@ _child_setup(Efl_Ui_List_Data *pd, Efl_Ui_List_Item* item, Efl_Model *model
item->obj = pd->obj;
item->model = efl_ref(model);
-// if(eina_inarray_count(recycle_layouts))
-// item->layout = *(void**)eina_inarray_pop(recycle_layouts);
-// else
-// item->layout = efl_add(ELM_LAYOUT_CLASS, pd->obj);
- item->layout = efl_ui_factory_create(pd->factory, item->model, pd->obj);
+ if(eina_inarray_count(recycle_layouts))
+ item->layout = *(void**)eina_inarray_pop(recycle_layouts);
+ else
+ item->layout = efl_ui_factory_create(pd->factory, item->model, pd->obj);
+ //item->layout = efl_add(ELM_LAYOUT_CLASS, pd->obj);
item->future = NULL;
item->index = idx + pd->realized.start;
item->minw = item->minh = 0;
@@ -565,8 +565,8 @@ _child_release(Efl_Ui_List_Data* pd, Efl_Ui_List_Item* item, Eina_Inarray* recyc
efl_future_cancel(item->future);
efl_unref(item->model);
// discard elm_layout to thrash to be able to reuse it
-// assert(item->layout != NULL);
-// eina_inarray_push(recycle_layouts, &item->layout);
+ assert(item->layout != NULL);
+ eina_inarray_push(recycle_layouts, &item->layout);
efl_ui_factory_release(pd->factory, item->layout);
item->layout = NULL;
if(_horiz(pd->orient))