genlist: add reorder fallback in scrolling case 78/110078/2
authorSangHyeon Lee <sh10233.lee@samsung.com>
Thu, 12 Jan 2017 05:00:55 +0000 (14:00 +0900)
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>
Fri, 13 Jan 2017 01:08:24 +0000 (17:08 -0800)
Change-Id: I786b6c8e14499c74def8b40c0fa517ba2f558982
(cherry picked from commit d492b7bdf6fa8b405d8d56c14cadaf07d9450fa8)

src/mobile_lib/elm_genlist.c

index ef4a08d..32f0959 100644 (file)
@@ -4568,7 +4568,17 @@ _item_mouse_down_cb(void *data,
    Elm_Genlist_Data *sd = GL_IT(it)->wsd;
    Evas_Coord x, y;
 
-   if (ev->event_flags & EVAS_EVENT_FLAG_ON_SCROLL) return;
+   if (ev->event_flags & EVAS_EVENT_FLAG_ON_SCROLL)
+     {
+        if (sd->reorder.it)
+          {
+             elm_genlist_item_reorder_stop(EO_OBJ(sd->reorder.it));
+             sd->reorder.it = NULL;
+             eo_do(sd->obj, elm_interface_scrollable_hold_set(EINA_FALSE));
+             eo_do(sd->obj, elm_interface_scrollable_bounce_allow_set(sd->h_bounce, sd->v_bounce));
+          }
+        return;
+     }
 
    if (ev->button != 1) return;
    // mouse down is activate only one finger