fix calling edje api on objects that may not be edje objects...

This commit is contained in:
Carsten Haitzler 2013-04-14 11:47:07 +09:00
parent 59bd729ca9
commit b851e10caf
1 changed files with 10 additions and 8 deletions

View File

@ -361,7 +361,6 @@ _scale_set(Eo *obj, void *_pd, va_list *list)
double scale = va_arg(*list, double); double scale = va_arg(*list, double);
Eina_Bool *ret = va_arg(*list, Eina_Bool *); Eina_Bool *ret = va_arg(*list, Eina_Bool *);
if (ret) *ret = EINA_TRUE; if (ret) *ret = EINA_TRUE;
Edje *ed, *ged; Edje *ed, *ged;
Evas_Object *o; Evas_Object *o;
Eina_List *l; Eina_List *l;
@ -373,13 +372,16 @@ _scale_set(Eo *obj, void *_pd, va_list *list)
EINA_LIST_FOREACH(ed->groups, l, ged) EINA_LIST_FOREACH(ed->groups, l, ged)
ged->scale = ed->scale; ged->scale = ed->scale;
EINA_LIST_FOREACH(ed->subobjs, l, o) EINA_LIST_FOREACH(ed->subobjs, l, o)
edje_object_calc_force(o); {
for(i = 0; i < ed->table_parts_size; ++i) const char *s = evas_object_type_get(o);
if ((s) && (!strcmp(s, "edje"))) edje_object_calc_force(o);
}
for (i = 0; i < ed->table_parts_size; i++)
{ {
Edje_Real_Part *ep; Edje_Real_Part *ep;
ep = ed->table_parts[i]; ep = ed->table_parts[i];
if ((ep->part->type == EDJE_PART_TYPE_BOX) if ((ep->part->type == EDJE_PART_TYPE_BOX) ||
|| (ep->part->type == EDJE_PART_TYPE_TABLE)) (ep->part->type == EDJE_PART_TYPE_TABLE))
{ {
EINA_LIST_FOREACH(ep->typedata.container->items, l, o) EINA_LIST_FOREACH(ep->typedata.container->items, l, o)
edje_object_scale_set(o, scale); edje_object_scale_set(o, scale);