Fix bug of re-parenting actors if children and parent actors are selected

This commit is contained in:
Chandler Cox
2023-04-14 13:34:43 -05:00
parent d813078e91
commit 62a335fab0

View File

@@ -717,6 +717,11 @@ namespace FlaxEditor.SceneGraph.GUI
for (var i = 0; i < tree.Selection.Count; i++)
{
var e = tree.Selection[i];
// Skip if parent is already selected to keep correct parenting
if (tree.Selection.Contains(e.Parent))
continue;
if (e is ActorTreeNode node && node.ActorNode.CanDrag)
actors.Add(node.ActorNode);
}