From 11933811eec441f9ac517a044d8281d897833093 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Mon, 1 Feb 2016 00:19:45 -0300 Subject: [PATCH] store animation names in alphabetical order, fixes #3423 --- scene/animation/animation_player.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/scene/animation/animation_player.cpp b/scene/animation/animation_player.cpp index f6d058c2fd1..344fc5ecde8 100644 --- a/scene/animation/animation_player.cpp +++ b/scene/animation/animation_player.cpp @@ -147,14 +147,21 @@ void AnimationPlayer::_get_property_list( List *p_list) const { List names; + List anim_names; + for( Map::Element *E=animation_set.front();E;E=E->next()) { - p_list->push_back( PropertyInfo( Variant::OBJECT, "anims/"+String(E->key()), PROPERTY_HINT_RESOURCE_TYPE, "Animation",PROPERTY_USAGE_NOEDITOR) ); + anim_names.push_back( PropertyInfo( Variant::OBJECT, "anims/"+String(E->key()), PROPERTY_HINT_RESOURCE_TYPE, "Animation",PROPERTY_USAGE_NOEDITOR) ); if (E->get().next!=StringName()) - p_list->push_back( PropertyInfo( Variant::STRING, "next/"+String(E->key()), PROPERTY_HINT_NONE, "",PROPERTY_USAGE_NOEDITOR) ); + anim_names.push_back( PropertyInfo( Variant::STRING, "next/"+String(E->key()), PROPERTY_HINT_NONE, "",PROPERTY_USAGE_NOEDITOR) ); names.push_back(E->key()); } + anim_names.sort(); + + for( List::Element *E=anim_names.front();E;E=E->next()) { + p_list->push_back(E->get()); + } { names.sort();