elm_toolbar: fix elm_toolbar_select_mode_set API
authorHosang Kim <hosang12.kim@samsung.com>
Wed, 23 Sep 2015 07:20:45 +0000 (16:20 +0900)
committerWooHyun Jung <wh0705.jung@samsung.com>
Wed, 23 Sep 2015 07:20:45 +0000 (16:20 +0900)
Summary: Item is unselected when I changed select mode "ELM_OBJECT_SELECT_MODE_DEFAULT" to "ELM_OBJECT_SELECT_MODE_ALWAYS".

Reviewers: Hermet, cedric, raster, seoz, woohyun

Reviewed By: woohyun

Differential Revision: https://phab.enlightenment.org/D3086

src/lib/elm_toolbar.c

index 708f32f..124c2ca 100644 (file)
@@ -3724,14 +3724,13 @@ _elm_toolbar_select_mode_set(Eo *obj EINA_UNUSED, Elm_Toolbar_Data *sd, Elm_Obje
      return;
 
    if (sd->select_mode == mode) return;
+   sd->select_mode = mode;
 
    if ((mode == ELM_OBJECT_SELECT_MODE_ALWAYS) &&
        (sd->select_mode != ELM_OBJECT_SELECT_MODE_ALWAYS) &&
        sd->items)
      _item_select(ELM_TOOLBAR_ITEM_FROM_INLIST(sd->items));
 
-   if (sd->select_mode != mode)
-     sd->select_mode = mode;
 }
 
 EOLIAN static Elm_Object_Select_Mode