Fix sorting items in various contextual list popups in Editor
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user