Sort variables in VisualScriptEditor

Sorts the script variables in alphabetical order to display them
in VisualScriptEditor.
This commit is contained in:
Raul Santos 2022-02-24 21:18:02 +01:00
parent 4dc8214831
commit a95cc4eff3
No known key found for this signature in database
GPG key ID: B532473AE3A803E4

View file

@ -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);