list: Select the first item when the list widget is just focused first time.

Select the first item if there is no last_focused_item,
 last_selected_item, and if this focus is done by key event.
This commit is contained in:
Daniel Juyung Seo 2014-03-22 18:07:27 +09:00
parent ec2d28fc32
commit 6d211692bb
1 changed files with 2 additions and 1 deletions

View File

@ -1075,7 +1075,8 @@ _elm_list_smart_on_focus(Eo *obj, void *_pd, va_list *list)
else if (sd->last_selected_item)
_elm_list_item_focused((Elm_List_Item *)sd->last_selected_item);
else if (!sd->mouse_down)
_elm_list_item_focused((Elm_List_Item *)eina_list_data_get(sd->items));
elm_list_item_selected_set(
eina_list_data_get(sd->items), EINA_TRUE);
_elm_widget_focus_highlight_start(obj);
}
else