EPhysics: disable evas map on
authorLeandro Dorileo <dorileo@profusion.mobi>
Tue, 30 Oct 2012 18:31:45 +0000 (18:31 +0000)
committerBruno Dilly <bdilly@profusion.mobi>
Tue, 30 Oct 2012 18:31:45 +0000 (18:31 +0000)
 ephysics_body_evas_object_set/unset

When unsetting or chaging the body's associated evas object we must
disable the evas map so the user can handle it afterwards.

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

SVN revision: 78680

legacy/ephysics/src/lib/ephysics_body.cpp

index 240b589..5dd5179 100644 (file)
@@ -2393,6 +2393,7 @@ ephysics_body_evas_object_set(EPhysics_Body *body, Evas_Object *evas_obj, Eina_B
                                        _ephysics_body_evas_obj_del_cb);
         evas_object_event_callback_del(body->evas_obj, EVAS_CALLBACK_RESIZE,
                                        _ephysics_body_evas_obj_resize_cb);
+        evas_object_map_enable_set(body->evas_obj, EINA_FALSE);
         if (body->soft_data)
           _ephysics_body_soft_body_slices_clean(body->soft_data);
      }
@@ -2446,6 +2447,7 @@ ephysics_body_evas_object_unset(EPhysics_Body *body)
                                        _ephysics_body_evas_obj_del_cb);
         evas_object_event_callback_del(obj, EVAS_CALLBACK_RESIZE,
                                        _ephysics_body_evas_obj_resize_cb);
+        evas_object_map_enable_set(obj, EINA_FALSE);
      }
 
    if (body->type != EPHYSICS_BODY_TYPE_RIGID)