cedric pushed a commit to branch master.

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

commit 8ed7e997c3c64100abd24c982133520591bf5f04
Author: Divyesh Purohit <purohit....@gmail.com>
Date:   Tue Jan 26 13:01:55 2016 -0800

    combobox: avoid calling item_selected and dismissed signal on show
    
    Summary:
    After this patch 
https://phab.enlightenment.org/rELM0f6e1a46a402fd9cf848ffb1bd47c6b406eb7ffa
    calling item,selected and dismissed signals should be avoided on combobox 
show.
    Signed-off-by: Divyesh Purohit <purohit....@gmail.com>
    
    Test Plan: please run combobox example from elementary_test
    
    Reviewers: cedric
    
    Differential Revision: https://phab.enlightenment.org/D3603
    
    Signed-off-by: Cedric BAIL <ced...@osg.samsung.com>
---
 src/lib/elc_combobox.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lib/elc_combobox.c b/src/lib/elc_combobox.c
index fbe0f1c..9ad0dbe 100644
--- a/src/lib/elc_combobox.c
+++ b/src/lib/elc_combobox.c
@@ -149,7 +149,6 @@ _table_resize(void *data)
         int current_height, h;
         const char *best_location;
         sd->item = elm_genlist_first_item_get(sd->genlist);
-        elm_genlist_item_selected_set(sd->item, EINA_TRUE);
         //FIXME:- the height of item is zero, sometimes.
         evas_object_geometry_get(elm_object_item_track(sd->item), NULL, NULL,
                                  NULL, &h);
@@ -188,6 +187,7 @@ _activate(Evas_Object *obj)
    elm_object_part_content_set(sd->hover, elm_hover_best_content_location_get
                                (sd->hover, ELM_HOVER_AXIS_VERTICAL), sd->tbl);
    evas_object_show(sd->genlist);
+   elm_genlist_item_selected_set(sd->item, EINA_TRUE);
    evas_object_show(sd->hover);
    eo_do(obj, eo_event_callback_call(ELM_COMBOBOX_EVENT_EXPANDED, NULL));
 }
@@ -217,7 +217,6 @@ _gl_filter_finished_cb(void *data, Eo *obj EINA_UNUSED,
    if (sd->first_filter)
      {
         sd->first_filter = EINA_FALSE;
-        elm_combobox_hover_end(data);
         return EINA_TRUE;
      }
 
@@ -229,6 +228,7 @@ _gl_filter_finished_cb(void *data, Eo *obj EINA_UNUSED,
         else _table_resize(data);
      }
    else elm_combobox_hover_end(data);
+   elm_genlist_item_selected_set(sd->item, EINA_TRUE);
    return EINA_TRUE;
 }
 

-- 


Reply via email to