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

@@ -249,6 +249,8 @@ namespace FlaxEngine.GUI
internal void ChangeChildIndex(Control child, int newIndex)
{
int oldIndex = _children.IndexOf(child);
if (oldIndex == newIndex)
return;
_children.RemoveAt(oldIndex);
// Check if index is invalid