summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2016-02-01 00:19:45 -0300
committerJuan Linietsky <reduzio@gmail.com>2016-02-01 00:31:13 -0300
commit11933811eec441f9ac517a044d8281d897833093 (patch)
treee76ab86c1d5f2670e2d466c618caf474ed8b3ba7
parent0cd8c054a2070a9b91505d5f3a9addfe131352f1 (diff)
store animation names in alphabetical order, fixes #3423
-rw-r--r--scene/animation/animation_player.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/scene/animation/animation_player.cpp b/scene/animation/animation_player.cpp
index f6d058c2fd..344fc5ecde 100644
--- a/scene/animation/animation_player.cpp
+++ b/scene/animation/animation_player.cpp
@@ -147,14 +147,21 @@ void AnimationPlayer::_get_property_list( List<PropertyInfo> *p_list) const {
List<String> names;
+ List<PropertyInfo> anim_names;
+
for( Map<StringName, AnimationData>::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<PropertyInfo>::Element *E=anim_names.front();E;E=E->next()) {
+ p_list->push_back(E->get());
+ }
{
names.sort();