[*][Genlist] Fixed genlist item positioning issue with group index.
authorDaniel Juyung Seo <juyung.seo@samsung.com>
Tue, 27 Dec 2011 02:29:50 +0000 (11:29 +0900)
committerDaniel Juyung Seo <juyung.seo@samsung.com>
Tue, 27 Dec 2011 02:29:50 +0000 (11:29 +0900)
This was caused by previous commit 'disable genlist group index
floating behavior.'. Commit id : 68167c7ad3e14f1352bc552d7774623ce2884a0f
I will investigate more.

Change-Id: Ie5f224a968905e3ea4bcf572a0b4b3da3aa3b53f

src/lib/elm_genlist.c

index c5045e8..a54043a 100644 (file)
@@ -3976,7 +3976,7 @@ elm_genlist_item_append(Evas_Object                  *obj,
    ELM_CHECK_WIDTYPE(obj, widtype) NULL;
    Widget_Data *wd = elm_widget_data_get(obj);
    if (!wd) return NULL;
-   if (flags == ELM_GENLIST_ITEM_GROUP) flags = ELM_GENLIST_ITEM_NONE;
+   if (parent && (parent->flags == ELM_GENLIST_ITEM_GROUP)) parent = NULL;
    Elm_Genlist_Item *it = _item_new(wd, itc, data, parent, flags, func,
                                     func_data);
    if (!it) return NULL;
@@ -4019,7 +4019,7 @@ elm_genlist_item_prepend(Evas_Object                  *obj,
    ELM_CHECK_WIDTYPE(obj, widtype) NULL;
    Widget_Data *wd = elm_widget_data_get(obj);
    if (!wd) return NULL;
-   if (flags == ELM_GENLIST_ITEM_GROUP) flags = ELM_GENLIST_ITEM_NONE;
+   if (parent && (parent->flags == ELM_GENLIST_ITEM_GROUP)) parent = NULL;
    Elm_Genlist_Item *it = _item_new(wd, itc, data, parent, flags, func,
                                     func_data);
 
@@ -4066,7 +4066,7 @@ elm_genlist_item_insert_after(Evas_Object                  *obj,
    Widget_Data *wd = elm_widget_data_get(obj);
    if (!wd) return NULL;
    EINA_SAFETY_ON_NULL_RETURN_VAL(wd->items, NULL);
-   if (flags == ELM_GENLIST_ITEM_GROUP) flags = ELM_GENLIST_ITEM_NONE;
+   if (parent && (parent->flags == ELM_GENLIST_ITEM_GROUP)) parent = NULL;
    Elm_Genlist_Item *it = _item_new(wd, itc, data, parent, flags, func,
                                     func_data);
    if (!it) return NULL;
@@ -4107,7 +4107,7 @@ elm_genlist_item_insert_before(Evas_Object                  *obj,
    Widget_Data *wd = elm_widget_data_get(obj);
    if (!wd) return NULL;
    EINA_SAFETY_ON_NULL_RETURN_VAL(wd->items, NULL);
-   if (flags == ELM_GENLIST_ITEM_GROUP) flags = ELM_GENLIST_ITEM_NONE;
+   if (parent && (parent->flags == ELM_GENLIST_ITEM_GROUP)) parent = NULL;
    Elm_Genlist_Item *it = _item_new(wd, itc, data, parent, flags, func,
                                     func_data);
    if (!it) return NULL;