naviframe: fix a focus issue when deleting the first item
authorWooHyun Jung <wh0705.jung@samsung.com>
Mon, 31 Aug 2015 07:15:55 +0000 (16:15 +0900)
committerWooHyun Jung <wh0705.jung@samsung.com>
Mon, 31 Aug 2015 07:15:55 +0000 (16:15 +0900)
Summary:
When the first item is deleted, focus should not be reverted back
to an object in the content of the item.

@fix

legacy/elementary/src/lib/elc_naviframe.c

index c9433cc..b11eda3 100644 (file)
@@ -553,7 +553,11 @@ _elm_naviframe_item_eo_base_destructor(Eo *eo_item, Elm_Naviframe_Item_Data *it)
         if (sd->stack && sd->stack->last)
           prev_it = EINA_INLIST_CONTAINER_GET(sd->stack->last,
                                               Elm_Naviframe_Item_Data);
-        if (!prev_it) goto end;
+        if (!prev_it)
+          {
+             elm_widget_tree_unfocusable_set(VIEW(nit), EINA_TRUE);
+             goto end;
+          }
 
         elm_widget_tree_unfocusable_set(VIEW(prev_it), EINA_FALSE);
         elm_widget_tree_unfocusable_set(VIEW(nit), EINA_TRUE);