genlist : forcely set NULL on focused_item if item is deleted
authorSangHyeon Lee <sh10233.lee@samsung.com>
Thu, 10 Nov 2016 10:01:46 +0000 (19:01 +0900)
committerJunsuChoi <jsuya.choi@samsung.com>
Thu, 17 Nov 2016 08:07:48 +0000 (17:07 +0900)
Change-Id: I3b9d161152b464d72b4998aba6dec630e8e7c188
Signed-off-by: SangHyeon Lee <sh10233.lee@samsung.com>
src/mobile_lib/elm_genlist.c

index fe90e8b..007356a 100644 (file)
@@ -5920,7 +5920,11 @@ _item_free(Elm_Gen_Item *it)
 
    if (sd->mode_item) sd->mode_item = NULL;
    if (it->selected) _item_unselect(it);
-   if (it == sd->focused_item) elm_object_item_focus_set(EO_OBJ(it), EINA_FALSE);
+   if (it == sd->focused_item)
+     {
+        elm_object_item_focus_set(EO_OBJ(it), EINA_FALSE);
+        sd->focused_item = NULL;
+     }
    if (it == sd->key_down_item) sd->key_down_item = NULL;
    if (it == sd->highlighted_item) sd->highlighted_item = NULL;
 #ifndef TIZEN_PROFILE_WEARABLE