(Node) Fixed "Child not found" warnings

Former-commit-id: e9f60071ef0b12155bc26d339e06ccc160fac1fd
This commit is contained in:
Lynix 2015-03-18 20:40:32 +01:00
parent 95cb02c41c
commit 4b09757f63
1 changed files with 6 additions and 1 deletions

View File

@ -41,7 +41,12 @@ m_transformMatrixUpdated(false)
NzNode::~NzNode()
{
for (NzNode* child : m_childs)
child->SetParent(nullptr);
{
// child->SetParent(nullptr); serait problématique car elle nous appellerait
child->m_parent = nullptr;
child->InvalidateNode();
child->OnParenting(nullptr);
}
SetParent(nullptr);
}