elm_genlist: add item checking locgic, when _item_mouse_up_cb is called.
authorHosang Kim <hosang12.kim@samsung.com>
Tue, 6 Dec 2016 10:31:01 +0000 (19:31 +0900)
committerWonki Kim <wonki_.kim@samsung.com>
Mon, 2 Jan 2017 05:37:04 +0000 (14:37 +0900)
Sometimes _item_focusable_search() API's return value and current item
will be different.

Change-Id: I14a885ce492210edca6a4aa21e5140e982b201fb

src/mobile_lib/elm_genlist.c

index b1055cc..a65a140 100644 (file)
@@ -5271,8 +5271,9 @@ _item_mouse_up_cb(void *data,
                   if (sd->focused_item != it)
                     {
                        Eina_Bool found = EINA_FALSE;
-                       found = _item_focusable_search(&it, 1);
-                       if (found)
+                       Elm_Gen_Item *it2 = it;
+                       found = _item_focusable_search(&it2, 1);
+                       if (found && (it == it2))
                          {
                             sd->focus_scrollto_type = ELM_GENLIST_ITEM_SCROLLTO_IN;
                             elm_object_item_focus_set(EO_OBJ(it), EINA_TRUE);