elm genlist: Fixed item selection bug with decorate_all mode. Patch by
authorseoz <seoz@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Fri, 20 Apr 2012 08:40:13 +0000 (08:40 +0000)
committerseoz <seoz@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Fri, 20 Apr 2012 08:40:13 +0000 (08:40 +0000)
Hyoyoung Chang <hyoyoung@gmail.com>

On Fri, Apr 20, 2012 at 5:19 PM, Hyoyoung Chang <hyoyoung@gmail.com>
wrote:
> After discuss with seoz, i changed to not clean selections also i
> removed the new added internal func.
>
> Thanks
>
> On Fri, Apr 20, 2012 at 4:00 PM, Hyoyoung Chang <hyoyoung@gmail.com>
wrote:
>> Dear all,
>>
>> I made a small patch to fix remained selection bug.
>> In decorate all mode, some item selection is not cleared after unset
>> decorate all mode.
>> I added to fix it.
>> And make unselecting common routine to a internal function.
>>
>> Thanks.

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@70354 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/elm_genlist.c

index 3ffd58a..c86072b 100644 (file)
@@ -3437,6 +3437,8 @@ _decorate_all_item_realize(Elm_Gen_Item *it, Eina_Bool effect_on)
    _decorate_all_item_position(it, it->item->scrl_x, it->item->scrl_y);
    evas_object_show(it->deco_all_view);
 
+   if (it->selected) edje_object_signal_emit(it->deco_all_view, "elm,state,selected", "elm");
+
    it->item->decorate_all_item_realized = EINA_TRUE;
    it->want_unrealize = EINA_FALSE;
 }
@@ -5551,7 +5553,6 @@ elm_genlist_decorate_mode_set(Evas_Object *obj, Eina_Bool decorated)
           {
              if (it->item->type != ELM_GENLIST_ITEM_GROUP)
                {
-                  if (it->selected) _item_unselect(it);
                   if (it->itc->decorate_all_item_style)
                      _decorate_all_item_realize(it, EINA_TRUE);
                }