Nasty bugfix: allow smart calculate to mark object as dirty again.

Wow, this was tricky to find since it is hard to trigger, thanks to
Canola complex edje files we could spot it!

In some cases we end with object being marked as dirty while
calculating its state (ie: edje), then we need to run smart calculate
again.

This has a drawback however: we cannot check for need_recalculate()
inside smart calculate anymore, we must assume it is only called if
the flag is set. To avoid that we could mark a shadow member and use
that or use a counter, that has the problem of using more data.




SVN revision: 38108
This commit is contained in:
Gustavo Sverzut Barbieri 2008-12-11 21:55:22 +00:00
parent 642d8686de
commit 11d859481f
1 changed files with 5 additions and 3 deletions

View File

@ -541,9 +541,11 @@ evas_object_smart_calculate(Evas_Object *obj)
return;
MAGIC_CHECK_END();
if (obj->smart.smart->smart_class->calculate)
obj->smart.smart->smart_class->calculate(obj);
if (!obj->smart.smart->smart_class->calculate)
return;
o->need_recalculate = 0;
obj->smart.smart->smart_class->calculate(obj);
}
/**
@ -570,8 +572,8 @@ evas_call_smarts_calculate(Evas *e)
o = obj->object_data;
if (o->need_recalculate)
{
obj->smart.smart->smart_class->calculate(obj);
o->need_recalculate = 0;
obj->smart.smart->smart_class->calculate(obj);
}
}