Fix order when pasting UI Controls

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

View File

@@ -52,7 +52,6 @@ namespace FlaxEngine
_control.Parent = GetParent();
_control.IndexInParent = OrderInParent;
_control.Location = new Vector2(LocalPosition);
// TODO: sync control order in parent with actor order in parent (think about special cases like Panel with scroll bars used as internal controls)
_control.LocationChanged += OnControlLocationChanged;
// Link children UI controls
@@ -353,6 +352,7 @@ namespace FlaxEngine
if (_control != null)
{
_control.Parent = GetParent();
_control.IndexInParent = OrderInParent;
}
}