Fix still showing some control transform properties in wrong spot.

This commit is contained in:
Chandler Cox
2024-04-29 19:38:36 -05:00
parent 2e5ad8c48a
commit 1c1d2fd96f

View File

@@ -456,9 +456,10 @@ namespace FlaxEditor.CustomEditors.Dedicated
for (int i = 0; i < layout.Children.Count; i++)
{
if (layout.Children[i] is GroupElement group && group.Panel.HeaderText == "Transform")
if (layout.Children[i] is GroupElement group && group.Panel.HeaderText.Equals("Transform", StringComparison.Ordinal))
{
layout.Children.Remove(group);
layout.ContainerControl.Children.Remove(group.Panel);
break;
}
}
@@ -489,7 +490,7 @@ namespace FlaxEditor.CustomEditors.Dedicated
// Get position of general tab
for (int i = 0; i < l.Children.Count; i++)
{
if (l.Children[i] is GroupElement g && g.Panel.HeaderText == "General" && i + 1 <= l.Children.Count)
if (l.Children[i] is GroupElement g && g.Panel.HeaderText.Equals("General", StringComparison.Ordinal) && i + 1 <= l.Children.Count)
{
Presenter.ContainerControl.ChangeChildIndex(transformGroup.Control, i + 1);
break;