Select dropped actors that are reparented.

This commit is contained in:
Chandler Cox
2024-12-03 17:59:30 -06:00
parent e2ed618056
commit f9e125f795

View File

@@ -596,11 +596,17 @@ namespace FlaxEditor.SceneGraph.GUI
{
bool worldPositionsStays = Root.GetKey(KeyboardKeys.Control) == false;
var objects = new SceneObject[_dragActors.Objects.Count];
var treeNodes = new TreeNode[_dragActors.Objects.Count];
for (int i = 0; i < objects.Length; i++)
{
objects[i] = _dragActors.Objects[i].Actor;
treeNodes[i] = _dragActors.Objects[i].TreeNode;
}
var action = new ParentActorsAction(objects, newParent, newOrder, worldPositionsStays);
ActorNode.Root.Undo?.AddAction(action);
action.Do();
ParentTree.Focus();
ParentTree.Select(treeNodes.ToList());
result = DragDropEffect.Move;
}
// Drag scripts