discomfitor pushed a commit to branch master.

http://git.enlightenment.org/apps/empc.git/commit/?id=08ee5e766b42b6f95b2b36b0361d40bcc9c80f62

commit 08ee5e766b42b6f95b2b36b0361d40bcc9c80f62
Author: Mike Blumenkrantz <zm...@osg.samsung.com>
Date:   Sat Apr 30 14:28:44 2016 -0400

    ensure a header song item is used when inserting a new header song item
    
    fixes blank items after deletion
---
 src/bin/empc.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/bin/empc.c b/src/bin/empc.c
index d68efa5..51ec8f1 100644
--- a/src/bin/empc.c
+++ b/src/bin/empc.c
@@ -2922,7 +2922,12 @@ queue_list_handler(Eina_Value *value, Eina_Bool update)
                        if (end || (!itp))
                          ith = elm_genlist_item_append(queue_list, 
&header_itc, Empd_Empdd_Song_copy(so), NULL, ELM_GENLIST_ITEM_GROUP, NULL, 
NULL);
                        else
-                         ith = elm_genlist_item_insert_after(queue_list, 
&header_itc, Empd_Empdd_Song_copy(so), NULL, itp, ELM_GENLIST_ITEM_GROUP, NULL, 
NULL);
+                         {
+                            ith = elm_genlist_item_parent_get(itp);
+                            if (!ith) ith = itp;
+                            ith = elm_genlist_item_insert_after(queue_list, 
&header_itc,
+                              Empd_Empdd_Song_copy(so), NULL, ith, 
ELM_GENLIST_ITEM_GROUP, NULL, NULL);
+                         }
                        snprintf(buf, sizeof(buf), "%s:::%s", so->artist, 
so->album);
                        //INF("NEW HEADER(%p): %s", ith, buf);
                        eina_hash_list_append(empd_current_queue_headers, buf, 
ith);

-- 


Reply via email to