forked from enlightenment/efl
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:
parent
237e303100
commit
8ea9bc7ba0
|
@ -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;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue