forked from enlightenment/efl
Examples genlist 5: Fix children aspect of the test not working.
This code is obviously wrong and could never have worked. The parent that is being kept between iterations is being overwritten on ever iteration, leading to the wrong result. CID1327358.
This commit is contained in:
parent
6eb2edfbd9
commit
fbaac7c231
|
@ -370,17 +370,18 @@ elm_main(int argc, char **argv)
|
|||
_button_add(list, fbox, "add child", _add_child_cb);
|
||||
_button_add(list, fbox, "del item", _del_item_cb);
|
||||
|
||||
|
||||
Node_Data *pdata = NULL; // data for the parent of the group
|
||||
Elm_Object_Item *glg = NULL;
|
||||
for (i = 0; i < N_ITEMS; i++)
|
||||
{
|
||||
Elm_Object_Item *gli = NULL, *glg = NULL;
|
||||
Elm_Object_Item *gli = NULL;
|
||||
Node_Data *data = malloc(sizeof(*data)); // data for this item
|
||||
data->children = NULL;
|
||||
data->value = i;
|
||||
data->favorite = EINA_FALSE;
|
||||
nitems++;
|
||||
|
||||
Node_Data *pdata = NULL; // data for the parent of the group
|
||||
|
||||
printf("creating item: #%d\n", data->value);
|
||||
if (i % 3 == 0)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue