mirror of
https://github.com/godotengine/godot.git
synced 2025-10-27 11:44:21 +00:00
[Core] Fix sorting of Dictionary keys
`StringName` keys were sorted as `StringName` which is unstable.
This commit is contained in:
parent
04692d83cb
commit
79f654ced5
5 changed files with 20 additions and 8 deletions
|
|
@ -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"]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue