summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaul Santos <raulsntos@gmail.com>2022-02-24 21:18:02 +0100
committerRaul Santos <raulsntos@gmail.com>2022-02-24 21:18:02 +0100
commita95cc4eff3977883f1aa7578258858c1bf368d64 (patch)
treef09fbddeb559f81f053eefce34fcc8d7b909808e
parent4dc8214831d1617e7f5f06e8294fb37ea23dae59 (diff)
Sort variables in VisualScriptEditor
Sorts the script variables in alphabetical order to display them in VisualScriptEditor.
-rw-r--r--modules/visual_script/editor/visual_script_editor.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/modules/visual_script/editor/visual_script_editor.cpp b/modules/visual_script/editor/visual_script_editor.cpp
index ff4b6a1f4b..813902b54e 100644
--- a/modules/visual_script/editor/visual_script_editor.cpp
+++ b/modules/visual_script/editor/visual_script_editor.cpp
@@ -1102,6 +1102,7 @@ void VisualScriptEditor::_update_members() {
List<StringName> var_names;
script->get_variable_list(&var_names);
+ var_names.sort_custom<StringName::AlphCompare>();
for (const StringName &E : var_names) {
TreeItem *ti = members->create_item(variables);