summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLarry Jr <larry.olj@gmail.com>2017-11-10 18:59:02 -0200
committerSangHyeon Jade Lee <dltkdgus1764@gmail.com>2017-11-15 17:06:45 +0900
commit0332cf008e64b07332e7a17e60b95f6c9b74803c (patch)
treeba68368778a2dbbc31f02925209d0374c97c5352
parent201608c57bf4a7ca2a9d913ce0c960b75fc385ca (diff)
elm: fixed count change update
-rw-r--r--src/lib/elementary/efl_ui_list_precise_layouter.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/lib/elementary/efl_ui_list_precise_layouter.c b/src/lib/elementary/efl_ui_list_precise_layouter.c
index f6a587c48a..9a806ec2d8 100644
--- a/src/lib/elementary/efl_ui_list_precise_layouter.c
+++ b/src/lib/elementary/efl_ui_list_precise_layouter.c
@@ -117,6 +117,12 @@ _count_then(void * data, Efl_Event const* event)
117 pd->count_future = NULL; 117 pd->count_future = NULL;
118 118
119 pd->count_total = *(int*)((Efl_Future_Event_Success*)event->info)->value; 119 pd->count_total = *(int*)((Efl_Future_Event_Success*)event->info)->value;
120
121 if (pd->modeler && pd->count_total != efl_ui_list_segarray_count(pd->segarray))
122 {
123 pd->recalc = EINA_TRUE;
124 efl_ui_list_model_load_range_set(pd->modeler, 0, 0); // load all
125 }
120} 126}
121 127
122static void 128static void
@@ -281,7 +287,7 @@ _calc_range(Efl_Ui_List_Precise_Layouter_Data *pd)
281 { 287 {
282 nodedata = node->layout_data; 288 nodedata = node->layout_data;
283// DBG("node %d h:%d ch:%d scr_y:%d oh:%d", node->first, nodedata->min.h, ch, scr_y, oh); 289// DBG("node %d h:%d ch:%d scr_y:%d oh:%d", node->first, nodedata->min.h, ch, scr_y, oh);
284 if (!nodedata->min.h) 290 if (!nodedata || !nodedata->min.h)
285 continue; 291 continue;
286 292
287 if ((ch >= scr_y || nodedata->min.h + ch >= scr_y) && (ch <= (scr_y + oh) || nodedata->min.h + ch <= scr_y + oh)) 293 if ((ch >= scr_y || nodedata->min.h + ch >= scr_y) && (ch <= (scr_y + oh) || nodedata->min.h + ch <= scr_y + oh))
@@ -360,7 +366,8 @@ _calc_size_job(void *data)
360 pd->calc_progress = 0; 366 pd->calc_progress = 0;
361 pd->calc_job = NULL; 367 pd->calc_job = NULL;
362 368
363 _efl_ui_list_relayout_layout_do(pd); 369 evas_object_smart_changed(pd->modeler);
370 //_efl_ui_list_relayout_layout_do(pd);
364} 371}
365 372
366EOLIAN static Efl_Object * 373EOLIAN static Efl_Object *
@@ -496,6 +503,8 @@ _efl_ui_list_relayout_layout_do(Efl_Ui_List_Precise_Layouter_Data *pd)
496 { 503 {
497 504
498 Efl_Ui_List_Precise_Layouter_Node_Data *nodedata = items_node->layout_data; 505 Efl_Ui_List_Precise_Layouter_Node_Data *nodedata = items_node->layout_data;
506 if (!nodedata) continue;
507
499 if (!nodedata->realized) 508 if (!nodedata->realized)
500 { 509 {
501 cur_pos += nodedata->min.h; 510 cur_pos += nodedata->min.h;