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
This commit is contained in:
ChunEon Park 2015-01-19 15:26:21 +09:00
parent 9df0e7202d
commit f87e3ccabd
1 changed files with 6 additions and 6 deletions

View File

@ -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;