Fix synchronizing ActorTreeNode order after actor duplicate

#487
This commit is contained in:
Wojtek Figat
2021-04-29 15:22:10 +02:00
parent a9b5c5d32d
commit c2afe0b6b2
5 changed files with 11 additions and 15 deletions

View File

@@ -112,18 +112,9 @@ namespace FlaxEditor.SceneGraph
{
if (parentNode != value)
{
if (parentNode != null)
{
parentNode.ChildNodes.Remove(this);
}
parentNode?.ChildNodes.Remove(this);
parentNode = value;
if (parentNode != null)
{
parentNode.ChildNodes.Add(this);
}
parentNode?.ChildNodes.Add(this);
OnParentChanged();
}
}