mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-29 09:32:45 +00:00
Improve the 'part has no parents' warning
This commit is contained in:
parent
4dc424036f
commit
632045e145
@ -1975,12 +1975,12 @@ namespace MWRender
|
||||
PartHolder::~PartHolder()
|
||||
{
|
||||
if (mNode.get() && !mNode->getNumParents())
|
||||
Log(Debug::Verbose) << "Part has no parents" ;
|
||||
Log(Debug::Verbose) << "Part \"" << mNode->getName() << "\" has no parents" ;
|
||||
|
||||
if (mNode.get() && mNode->getNumParents())
|
||||
{
|
||||
if (mNode->getNumParents() > 1)
|
||||
Log(Debug::Verbose) << "Part has multiple (" << mNode->getNumParents() << ") parents";
|
||||
Log(Debug::Verbose) << "Part \"" << mNode->getName() << "\" has multiple (" << mNode->getNumParents() << ") parents";
|
||||
mNode->getParent(0)->removeChild(mNode);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user