From: ChunEon Park Date: Mon, 19 Jan 2015 06:26:21 +0000 (+0900) Subject: genlist: fix genlist multi-selected problem. X-Git-Tag: v1.13.0-beta1~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e45de1ed19314d1687a86d904802ba7067ae4b38;p=platform%2Fupstream%2Felementary.git genlist: fix genlist multi-selected problem. user request was ignored if they calls the genlist_item_selected_set(true) to another item in an item selected callback. because genlist made the selected item highlighted after user "selected" callback. The behavior had been changed on my genlist refactoring, so the behavior was actually just restored. This issue resolves T2020 --- diff --git a/src/lib/elm_genlist.c b/src/lib/elm_genlist.c index 10c9162..fd80482 100644 --- a/src/lib/elm_genlist.c +++ b/src/lib/elm_genlist.c @@ -5680,6 +5680,12 @@ _item_select(Elm_Gen_Item *it) } evas_object_ref(obj); + + elm_object_item_focus_set(eo_it, EINA_TRUE); + _elm_genlist_item_content_focus_set(it, ELM_FOCUS_PREVIOUS); + sd->last_selected_item = eo_it; + _item_highlight(it); + it->walking++; if (it->func.func) it->func.func((void *)it->func.data, WIDGET(it), eo_it); // delete item if it's requested deletion in the above callbacks. @@ -5689,12 +5695,6 @@ _item_select(Elm_Gen_Item *it) if ((it->base)->on_deletion) goto item_deleted; it->walking--; - elm_object_item_focus_set(eo_it, EINA_TRUE); - _elm_genlist_item_content_focus_set(it, ELM_FOCUS_PREVIOUS); - - sd->last_selected_item = eo_it; - _item_highlight(it); - if (!(sd->focus_on_selection_enabled || _elm_config->item_select_on_focus_disable)) { Evas_Object *swallow_obj;