diff options
author | Bruno Dilly <bdilly@profusion.mobi> | 2012-10-25 21:55:03 +0000 |
---|---|---|
committer | Bruno Dilly <bdilly@profusion.mobi> | 2012-10-25 21:55:03 +0000 |
commit | 8ae0d9af745e4c1bf07121b73568e27a9ea07cb4 (patch) | |
tree | e2270a9d98276c9d17d5ee11780a0d21f8e24ad5 | |
parent | 65b9ff36adce377f311022e766dc67b59d7bd3f1 (diff) | |
download | efl-8ae0d9af745e4c1bf07121b73568e27a9ea07cb4.tar.gz efl-8ae0d9af745e4c1bf07121b73568e27a9ea07cb4.tar.xz efl-8ae0d9af745e4c1bf07121b73568e27a9ea07cb4.zip |
ephysics: stack respect body adding order for same z
When bodies have the same z coordinate, the added first will
be below the others.
SVN revision: 78489
-rw-r--r-- | legacy/ephysics/src/lib/ephysics_body.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/legacy/ephysics/src/lib/ephysics_body.cpp b/legacy/ephysics/src/lib/ephysics_body.cpp index b2aaa117a..b02f00663 100644 --- a/legacy/ephysics/src/lib/ephysics_body.cpp +++ b/legacy/ephysics/src/lib/ephysics_body.cpp @@ -359,11 +359,11 @@ _ephysics_body_evas_stacking_sort_cb(const void *d1, const void *d2) stacking1 = (const EPhysics_Body_Evas_Stacking *)d1; stacking2 = (const EPhysics_Body_Evas_Stacking *)d2; - if (!stacking1) return 1; - if (!stacking2) return -1; + if (!stacking1) return -1; + if (!stacking2) return 1; - if (stacking1->stacking < stacking2->stacking) return -1; - if (stacking2->stacking > stacking2->stacking) return 1; + if (stacking1->stacking < stacking2->stacking) return 1; + if (stacking2->stacking > stacking2->stacking) return -1; return 0; } @@ -430,7 +430,7 @@ ephysics_body_evas_objects_restack(EPhysics_World *world) } if (prev_obj) - evas_object_stack_above(stacking->evas, prev_obj); + evas_object_stack_below(stacking->evas, prev_obj); prev_obj = stacking->evas; free(stacking); |