elm genlist: Unset decorate item mode when decorate mode set is called. Yes that's so confusing. 'Decorate Item Mode' and 'Decorate Mode' are different and exlusive from the implementation.

SVN revision: 72173
This commit is contained in:
Daniel Juyung Seo 2012-06-15 07:58:08 +00:00
parent 854b8960e9
commit fab4708d34
1 changed files with 11 additions and 0 deletions

View File

@ -5643,6 +5643,7 @@ elm_genlist_decorate_mode_set(Evas_Object *obj, Eina_Bool decorated)
ELM_CHECK_WIDTYPE(obj, widtype);
Eina_List *list, *l;
Elm_Gen_Item *it;
Elm_Object_Item *deco_it;
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
@ -5662,6 +5663,16 @@ elm_genlist_decorate_mode_set(Evas_Object *obj, Eina_Bool decorated)
}
else
{
// unset decorated item
deco_it = (Elm_Object_Item *)elm_genlist_decorated_item_get(obj);
if (deco_it)
{
elm_genlist_item_decorate_mode_set(deco_it,
elm_genlist_item_decorate_mode_get(deco_it),
EINA_FALSE);
_decorate_item_finished_signal_cb(deco_it, obj, NULL, NULL);
}
EINA_LIST_FOREACH(list, l, it)
{
if (it->item->type != ELM_GENLIST_ITEM_GROUP)