summaryrefslogtreecommitdiff
path: root/legacy/ephysics
diff options
context:
space:
mode:
authorLeandro Dorileo <dorileo@profusion.mobi>2012-10-09 19:59:53 +0000
committerBruno Dilly <bdilly@profusion.mobi>2012-10-09 19:59:53 +0000
commit6f9e9a67f71981cf0945f0cabe0950af9dad2862 (patch)
treefb1d99d23b8d128c3e30f59276c956c1da8efb90 /legacy/ephysics
parentb36c0c9d623f31abe132700265183aabc4138533 (diff)
EPhysics: body evas object unset return the base
object In the unset operation return the base object, not the smart one. Patch by: Leandro Dorileo <dorileo@profusion.mobi> SVN revision: 77676
Diffstat (limited to 'legacy/ephysics')
-rw-r--r--legacy/ephysics/src/lib/ephysics_body.cpp19
1 files changed, 18 insertions, 1 deletions
diff --git a/legacy/ephysics/src/lib/ephysics_body.cpp b/legacy/ephysics/src/lib/ephysics_body.cpp
index 7e532e21cd..3e45a5cd51 100644
--- a/legacy/ephysics/src/lib/ephysics_body.cpp
+++ b/legacy/ephysics/src/lib/ephysics_body.cpp
@@ -362,6 +362,15 @@ _ephysics_body_soft_body_evas_add(EPhysics_Body *body)
362 return obj; 362 return obj;
363} 363}
364 364
365static Evas_Object *
366_ephysics_body_soft_body_evas_base_obj_get(Evas_Object *obj)
367{
368 EPhysics_Body_Soft_Body_Smart_Data *priv;
369
370 EPHYSICS_BODY_SOFT_BODY_SMART_DATA_GET(obj, priv);
371 return priv->base_obj;
372}
373
365static btTransform 374static btTransform
366_ephysics_body_transform_get(const EPhysics_Body *body) 375_ephysics_body_transform_get(const EPhysics_Body *body)
367{ 376{
@@ -1862,7 +1871,8 @@ ephysics_body_evas_object_set(EPhysics_Body *body, Evas_Object *evas_obj, Eina_B
1862EAPI Evas_Object * 1871EAPI Evas_Object *
1863ephysics_body_evas_object_unset(EPhysics_Body *body) 1872ephysics_body_evas_object_unset(EPhysics_Body *body)
1864{ 1873{
1865 Evas_Object *obj; 1874 Evas_Object *obj, *smart;
1875
1866 if (!body) 1876 if (!body)
1867 { 1877 {
1868 ERR("Can't unset evas object from body, it wasn't provided."); 1878 ERR("Can't unset evas object from body, it wasn't provided.");
@@ -1880,6 +1890,13 @@ ephysics_body_evas_object_unset(EPhysics_Body *body)
1880 _ephysics_body_evas_obj_resize_cb); 1890 _ephysics_body_evas_obj_resize_cb);
1881 } 1891 }
1882 1892
1893 if (evas_object_smart_type_check(obj, SMART_CLASS_NAME))
1894 {
1895 smart = obj;
1896 obj = _ephysics_body_soft_body_evas_base_obj_get(obj);
1897 evas_object_del(smart);
1898 }
1899
1883 return obj; 1900 return obj;
1884} 1901}
1885 1902