Fixed assertion failure when creating bodies with Component.createObject
authorThorbjørn Lindeijer <thorbjorn.lindeijer@nokia.com>
Sat, 5 Feb 2011 14:16:04 +0000 (15:16 +0100)
committerThorbjørn Lindeijer <thorbjorn.lindeijer@nokia.com>
Sat, 5 Feb 2011 14:16:04 +0000 (15:16 +0100)
commit6ea9e89770ed4079dbb6c69038ad2a8f4b2c45e3
tree5b5027d45bd82fc7635722fa13260335526110db
parent96893cc33ef2edf7d5f41b2c1f90784676f2dcf8
Fixed assertion failure when creating bodies with Component.createObject

QDeclarativeComponent::createObject causes the parent to be set before a
component is complete. In that case the anchors have not been evaluated
yet, which caused an assertion failure when using anchors with a Box
component, since its polygon was still invalid.

Solved this issue by delaying the creation of the internal body until
the Body component is complete.
box2dbody.cpp
box2dbody.h