From bb9563c8927a08d2f93c36b63261af1dfdff6a2b Mon Sep 17 00:00:00 2001 From: Amitesh Singh Date: Mon, 22 Jun 2015 11:59:21 +0200 Subject: [PATCH] elm_genlist: reset timer to NULL on cancel only. Summary: @fix Reviewers: raster, seoz, SanghyeonLee Subscribers: sachin.dev, seoz Differential Revision: https://phab.enlightenment.org/D2730 Signed-off-by: Cedric BAIL --- legacy/elementary/src/lib/elm_genlist.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/legacy/elementary/src/lib/elm_genlist.c b/legacy/elementary/src/lib/elm_genlist.c index 17bebca2f2..225d0953f4 100644 --- a/legacy/elementary/src/lib/elm_genlist.c +++ b/legacy/elementary/src/lib/elm_genlist.c @@ -3859,10 +3859,9 @@ _long_press_cb(void *data) Eina_List *list; ELM_GENLIST_DATA_GET_FROM_ITEM(it, sd); - it->long_timer = NULL; if (_is_no_select(it) || eo_do_ret(EO_OBJ(it), tmp, elm_wdg_item_disabled_get()) || (it->dragging)) - return ECORE_CALLBACK_CANCEL; + goto end; sd->longpressed = EINA_TRUE; evas_object_smart_callback_call(WIDGET(it), SIG_LONGPRESSED, EO_OBJ(it)); @@ -3897,6 +3896,8 @@ _long_press_cb(void *data) edje_object_signal_emit(VIEW(it), SIGNAL_REORDER_ENABLED, "elm"); } +end: + it->long_timer = NULL; return ECORE_CALLBACK_CANCEL; }