summaryrefslogtreecommitdiff
path: root/editor/create_dialog.cpp
diff options
context:
space:
mode:
authorBernhard Liebl <Bernhard.Liebl@gmx.org>2017-11-04 19:01:01 +0100
committerBernhard Liebl <Bernhard.Liebl@gmx.org>2017-11-04 19:01:01 +0100
commita8012f1b25b1462b26b867867d2bca780fe3dd1d (patch)
tree61355253ca678c508e80c17ab14ee3ae48836b88 /editor/create_dialog.cpp
parent3cbcf5c2ddadf1cd630137d6bd438634b8517b00 (diff)
Fixes random sorting order in Create New Node dialog
Diffstat (limited to 'editor/create_dialog.cpp')
-rw-r--r--editor/create_dialog.cpp6
1 files changed, 3 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<StringName> type_list;
- ClassDB::get_class_list(&type_list);
-
HashMap<String, TreeItem *> 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<StringName::AlphCompare>();
+
set_resizable(true);
HSplitContainer *hbc = memnew(HSplitContainer);