elm genlist: Fixed garbage item issue in decorate all mode.
authorDaniel Juyung Seo <seojuyung2@gmail.com>
Thu, 26 Jul 2012 05:50:21 +0000 (05:50 +0000)
committerDaniel Juyung Seo <seojuyung2@gmail.com>
Thu, 26 Jul 2012 05:50:21 +0000 (05:50 +0000)
This fixes "elm - genlist decorate all mode on and scroll - garbage
items left around."

Note: Do not manipulate swallowed items. Unswallow it first then
manipulate it.

SVN revision: 74412

src/lib/elm_genlist.c

index 5dfaf6e..5f98c65 100644 (file)
@@ -4325,6 +4325,10 @@ _item_unrealize_cb(Elm_Gen_Item *it)
    EINA_LIST_FREE (it->item->flip_content_objs, content)
      evas_object_del(content);
 
+   // unswallow VIEW(it) first then manipulate VIEW(it)
+   _decorate_item_unrealize(it);
+   if (GL_IT(it)->wsd->decorate_all_mode) _decorate_all_item_unrealize(it);
+
    if (it->item->nocache_once || it->item->nocache)
      {
         evas_object_del(VIEW(it));
@@ -4345,11 +4349,9 @@ _item_unrealize_cb(Elm_Gen_Item *it)
         _item_cache_add(it);
      }
 
-   _decorate_item_unrealize(it);
    it->states = NULL;
    it->realized = EINA_FALSE;
    it->want_unrealize = EINA_FALSE;
-   if (GL_IT(it)->wsd->decorate_all_mode) _decorate_all_item_unrealize(it);
 }
 
 static Eina_Bool