Fix sorting items in various contextual list popups in Editor

This commit is contained in:
Wojciech Figat
2022-03-25 15:36:30 +01:00
parent a917397090
commit 3e9b6caa1c
11 changed files with 23 additions and 10 deletions

View File

@@ -273,7 +273,7 @@ namespace FlaxEditor.CustomEditors.Dedicated
cm.AddItem(item);
}
cm.ItemClicked += item => action((string)item.Tag);
cm.SortChildren();
cm.SortItems();
cm.Show(button.Parent, button.BottomLeft);
}

View File

@@ -71,7 +71,7 @@ namespace FlaxEditor.CustomEditors.Dedicated
cm.AddItem(new TypeSearchPopup.TypeItemView(scripts[i]));
}
cm.ItemClicked += item => AddScript((ScriptType)item.Tag);
cm.SortChildren();
cm.SortItems();
cm.Show(this, button.BottomLeft);
}

View File

@@ -642,7 +642,7 @@ namespace FlaxEditor.CustomEditors.Dedicated
cm.AddItem(new TypeSearchPopup.TypeItemView(controlTypes[i]));
}
cm.ItemClicked += controlType => SetType((ScriptType)controlType.Tag);
cm.SortChildren();
cm.SortItems();
cm.Show(button.Parent, button.BottomLeft);
}