diff options
author | Thaddeus Crews <repiteo@outlook.com> | 2024-10-21 16:39:05 -0500 |
---|---|---|
committer | Thaddeus Crews <repiteo@outlook.com> | 2024-10-21 16:39:05 -0500 |
commit | 5fb22327eeeb230328dca8b7016e36a1c9aad740 (patch) | |
tree | eb46860eb99a472ad645b312a4437c8942337a3e /editor/plugins/visual_shader_editor_plugin.cpp | |
parent | 5e65747d90411d58da46dd1a0dd0385280ff57ac (diff) | |
parent | 610635e1c8d8940397723052088979d16aa30a40 (diff) | |
download | redot-engine-5fb22327eeeb230328dca8b7016e36a1c9aad740.tar.gz |
Merge pull request #97542 from AThousandShips/dict_sort_fix
[Core] Fix sorting of `Dictionary` keys
Diffstat (limited to 'editor/plugins/visual_shader_editor_plugin.cpp')
-rw-r--r-- | editor/plugins/visual_shader_editor_plugin.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/editor/plugins/visual_shader_editor_plugin.cpp b/editor/plugins/visual_shader_editor_plugin.cpp index ede8351e41..a5df9edcf0 100644 --- a/editor/plugins/visual_shader_editor_plugin.cpp +++ b/editor/plugins/visual_shader_editor_plugin.cpp @@ -2128,12 +2128,11 @@ void VisualShaderEditor::_update_nodes() { } } - Array keys = added.keys(); - keys.sort(); - - for (int i = 0; i < keys.size(); i++) { - const Variant &key = keys.get(i); + List<Variant> keys; + added.get_key_list(&keys); + keys.sort_custom<StringLikeVariantOrder>(); + for (const Variant &key : keys) { const Dictionary &value = (Dictionary)added[key]; add_custom_type(value["name"], value["type"], value["script"], value["description"], value["return_icon_type"], value["category"], value["highend"]); |