elm_genlist: reset timer to NULL on cancel only.
authorAmitesh Singh <amitesh.sh@samsung.com>
Mon, 22 Jun 2015 09:59:21 +0000 (11:59 +0200)
committerCedric BAIL <cedric@osg.samsung.com>
Mon, 22 Jun 2015 10:36:57 +0000 (12:36 +0200)
Summary: @fix

Reviewers: raster, seoz, SanghyeonLee

Subscribers: sachin.dev, seoz

Differential Revision: https://phab.enlightenment.org/D2730

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
src/lib/elm_genlist.c

index 17bebca..225d095 100644 (file)
@@ -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;
 }