edje: Set the default image in image set.

If there's no suitable image in image set, set the first image among
the set.
This commit is contained in:
Jaehwan Kim 2014-11-18 17:13:38 +09:00
parent 237e303100
commit 8ea9bc7ba0
1 changed files with 17 additions and 0 deletions

View File

@ -405,6 +405,23 @@ _edje_image_find(Evas_Object *obj, Edje *ed, Edje_Real_Part_Set **eps,
}
}
entry = eina_list_data_get(set->entries);
if (entry)
{
if (eps)
{
if (!*eps)
*eps = calloc(1, sizeof (Edje_Real_Part_Set));
if (*eps)
{
(*eps)->entry = entry;
(*eps)->set = set;
(*eps)->id = id;
}
}
return entry->id;
}
return -1;
}