EPhysics: avoid restacking objects on different layers

If the two objects are not in the same layer avoid restacking it.


Patch by: Leandro Dorileo <dorileo@profusion.mobi>



SVN revision: 78193
This commit is contained in:
Leandro Dorileo 2012-10-18 19:18:00 +00:00 committed by Bruno Dilly
parent c6bf21cbbe
commit 02903536b3
1 changed files with 10 additions and 0 deletions

View File

@ -380,6 +380,16 @@ ephysics_body_evas_objects_restack(EPhysics_World *world)
{
stacking = (EPhysics_Body_Evas_Stacking *)data;
if (prev_obj && evas_object_layer_get(prev_obj) !=
evas_object_layer_get(stacking->evas))
{
INF("The world %p has bodies with associated evas objects on"
" different layers, skipping the restaking for %p and %p",
world, prev_obj, stacking->evas);
free(stacking);
continue;
}
if (prev_obj)
evas_object_stack_above(stacking->evas, prev_obj);