hermet pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=e45de1ed19314d1687a86d904802ba7067ae4b38

commit e45de1ed19314d1687a86d904802ba7067ae4b38
Author: ChunEon Park <[email protected]>
Date:   Mon Jan 19 15:26:21 2015 +0900

    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
---
 src/lib/elm_genlist.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

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;

-- 


Reply via email to