You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-07 12:30:27 +00:00
Fixes random sorting order in Create New Node dialog
This commit is contained in:
@@ -211,9 +211,6 @@ void CreateDialog::_update_search() {
|
|||||||
_parse_fs(EditorFileSystem::get_singleton()->get_filesystem());
|
_parse_fs(EditorFileSystem::get_singleton()->get_filesystem());
|
||||||
*/
|
*/
|
||||||
|
|
||||||
List<StringName> type_list;
|
|
||||||
ClassDB::get_class_list(&type_list);
|
|
||||||
|
|
||||||
HashMap<String, TreeItem *> types;
|
HashMap<String, TreeItem *> types;
|
||||||
|
|
||||||
TreeItem *root = search_options->create_item();
|
TreeItem *root = search_options->create_item();
|
||||||
@@ -615,6 +612,9 @@ void CreateDialog::_bind_methods() {
|
|||||||
|
|
||||||
CreateDialog::CreateDialog() {
|
CreateDialog::CreateDialog() {
|
||||||
|
|
||||||
|
ClassDB::get_class_list(&type_list);
|
||||||
|
type_list.sort_custom<StringName::AlphCompare>();
|
||||||
|
|
||||||
set_resizable(true);
|
set_resizable(true);
|
||||||
|
|
||||||
HSplitContainer *hbc = memnew(HSplitContainer);
|
HSplitContainer *hbc = memnew(HSplitContainer);
|
||||||
|
|||||||
@@ -55,6 +55,7 @@ class CreateDialog : public ConfirmationDialog {
|
|||||||
String base_type;
|
String base_type;
|
||||||
String preferred_search_result_type;
|
String preferred_search_result_type;
|
||||||
EditorHelpBit *help_bit;
|
EditorHelpBit *help_bit;
|
||||||
|
List<StringName> type_list;
|
||||||
|
|
||||||
void _item_selected();
|
void _item_selected();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user