discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=51e86a4c0d32330234038aee5e1d804130c8cf31

commit 51e86a4c0d32330234038aee5e1d804130c8cf31
Author: Mike Blumenkrantz <zm...@osg.samsung.com>
Date:   Sat Apr 30 14:31:29 2016 -0400

    elm_genlist: throw CRI when group item insertion fails
    
    this really needs a better solution since it results in a blank genlist
    item space, with the item itself typically located somewhere offscreen due
    to caching
---
 src/lib/elementary/elm_genlist.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/lib/elementary/elm_genlist.c b/src/lib/elementary/elm_genlist.c
index b44b4c6..1abfe0c 100644
--- a/src/lib/elementary/elm_genlist.c
+++ b/src/lib/elementary/elm_genlist.c
@@ -6296,6 +6296,8 @@ _elm_genlist_item_insert_after(Eo *obj EINA_UNUSED, 
Elm_Genlist_Data *sd, const
             (GL_IT(after)->type & ELM_GENLIST_ITEM_GROUP))
           sd->group_items = eina_list_append_relative
              (sd->group_items, it, after);
+        else if (GL_IT(it)->type & ELM_GENLIST_ITEM_GROUP)
+          CRI("GROUP ITEM INSERT FAILED: NON-GROUP ITEM PASSED AS 'after'!");
      }
    else
      {
@@ -6343,6 +6345,8 @@ _elm_genlist_item_insert_before(Eo *obj, Elm_Genlist_Data 
*sd, const Elm_Genlist
             (GL_IT(before)->type & ELM_GENLIST_ITEM_GROUP))
           sd->group_items =
             eina_list_prepend_relative(sd->group_items, it, before);
+        else if (GL_IT(it)->type & ELM_GENLIST_ITEM_GROUP)
+          CRI("GROUP ITEM INSERT FAILED: NON-GROUP ITEM PASSED AS 'after'!");
      }
    else
      {

-- 


Reply via email to