summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2015-05-28 11:58:46 -0400
committerMike Blumenkrantz <zmike@osg.samsung.com>2015-05-28 11:59:51 -0400
commit2fd7b01f4371e24208c245949d64fcc8f2042b7c (patch)
tree53424fc79e4b8e6f57190e9369f057f0fbdc74d5
parenta76416f6ba54b7ab274b40faccdec12f3fad54c5 (diff)
gengrid/genlist: decrement item counter before triggering item del callback
@fix
-rw-r--r--src/lib/elm_gengrid.c3
-rw-r--r--src/lib/elm_genlist.c3
2 files changed, 2 insertions, 4 deletions
diff --git a/src/lib/elm_gengrid.c b/src/lib/elm_gengrid.c
index 3e4335671..688ef19d9 100644
--- a/src/lib/elm_gengrid.c
+++ b/src/lib/elm_gengrid.c
@@ -3306,6 +3306,7 @@ _elm_gengrid_item_del_serious(Elm_Gen_Item *it)
3306{ 3306{
3307 ELM_GENGRID_DATA_GET_FROM_ITEM(it, sd); 3307 ELM_GENGRID_DATA_GET_FROM_ITEM(it, sd);
3308 3308
3309 sd->item_count--;
3309 _elm_gengrid_item_del_not_serious(it); 3310 _elm_gengrid_item_del_not_serious(it);
3310 sd->items = eina_inlist_remove(sd->items, EINA_INLIST_GET(it)); 3311 sd->items = eina_inlist_remove(sd->items, EINA_INLIST_GET(it));
3311 if (it->tooltip.del_cb) 3312 if (it->tooltip.del_cb)
@@ -3319,8 +3320,6 @@ _elm_gengrid_item_del_serious(Elm_Gen_Item *it)
3319 ecore_job_del(sd->calc_job); 3320 ecore_job_del(sd->calc_job);
3320 sd->calc_job = ecore_job_add(sd->calc_cb, sd->obj); 3321 sd->calc_job = ecore_job_add(sd->calc_cb, sd->obj);
3321 3322
3322 sd->item_count--;
3323
3324 ELM_SAFE_FREE(it->item, free); 3323 ELM_SAFE_FREE(it->item, free);
3325} 3324}
3326 3325
diff --git a/src/lib/elm_genlist.c b/src/lib/elm_genlist.c
index 7b0853f90..50a3ffcfb 100644
--- a/src/lib/elm_genlist.c
+++ b/src/lib/elm_genlist.c
@@ -3556,6 +3556,7 @@ _elm_genlist_item_del_serious(Elm_Gen_Item *it)
3556{ 3556{
3557 ELM_GENLIST_DATA_GET_FROM_ITEM(it, sd); 3557 ELM_GENLIST_DATA_GET_FROM_ITEM(it, sd);
3558 3558
3559 sd->item_count--;
3559 _elm_genlist_item_del_not_serious(it); 3560 _elm_genlist_item_del_not_serious(it);
3560 3561
3561 //(it->walking == -1) means it's already removed from the list. 3562 //(it->walking == -1) means it's already removed from the list.
@@ -3571,8 +3572,6 @@ _elm_genlist_item_del_serious(Elm_Gen_Item *it)
3571 ecore_job_del(sd->calc_job); 3572 ecore_job_del(sd->calc_job);
3572 sd->calc_job = ecore_job_add(_calc_job, sd->obj); 3573 sd->calc_job = ecore_job_add(_calc_job, sd->obj);
3573 3574
3574 sd->item_count--;
3575
3576 ELM_SAFE_FREE(it->item, free); 3575 ELM_SAFE_FREE(it->item, free);
3577} 3576}
3578 3577