From a8012f1b25b1462b26b867867d2bca780fe3dd1d Mon Sep 17 00:00:00 2001 From: Bernhard Liebl Date: Sat, 4 Nov 2017 19:01:01 +0100 Subject: Fixes random sorting order in Create New Node dialog --- editor/create_dialog.cpp | 6 +++--- editor/create_dialog.h | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/editor/create_dialog.cpp b/editor/create_dialog.cpp index 520bf480fd..a1f66318cc 100644 --- a/editor/create_dialog.cpp +++ b/editor/create_dialog.cpp @@ -211,9 +211,6 @@ void CreateDialog::_update_search() { _parse_fs(EditorFileSystem::get_singleton()->get_filesystem()); */ - List type_list; - ClassDB::get_class_list(&type_list); - HashMap types; TreeItem *root = search_options->create_item(); @@ -615,6 +612,9 @@ void CreateDialog::_bind_methods() { CreateDialog::CreateDialog() { + ClassDB::get_class_list(&type_list); + type_list.sort_custom(); + set_resizable(true); HSplitContainer *hbc = memnew(HSplitContainer); diff --git a/editor/create_dialog.h b/editor/create_dialog.h index 2e4ce9b277..157c126c66 100644 --- a/editor/create_dialog.h +++ b/editor/create_dialog.h @@ -55,6 +55,7 @@ class CreateDialog : public ConfirmationDialog { String base_type; String preferred_search_result_type; EditorHelpBit *help_bit; + List type_list; void _item_selected(); -- cgit v1.2.3