summaryrefslogtreecommitdiff
path: root/scene/resources/sample_library.cpp
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2016-06-30 18:43:47 -0300
committerJuan Linietsky <reduzio@gmail.com>2016-06-30 18:43:47 -0300
commitb391306828294bc28675e135e7c2232ac6b8305a (patch)
tree7ab0bfae02c3ffff8e9e4839f32ebb7a113b94cd /scene/resources/sample_library.cpp
parentb9326e3f2bf08026b1b1a990432606c7633fad32 (diff)
Make both signals be ordered and samplelibrary items too, fixes scenes changing for git, closes #5289
Diffstat (limited to 'scene/resources/sample_library.cpp')
-rw-r--r--scene/resources/sample_library.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/scene/resources/sample_library.cpp b/scene/resources/sample_library.cpp
index 5b70ee0e11..73517b180e 100644
--- a/scene/resources/sample_library.cpp
+++ b/scene/resources/sample_library.cpp
@@ -122,9 +122,17 @@ bool SampleLibrary::has_sample(const StringName& p_name) const {
void SampleLibrary::_get_property_list(List<PropertyInfo> *p_list) const {
+
+ List<PropertyInfo> tpl;
for(Map<StringName,SampleData>::Element *E=sample_map.front();E;E=E->next()) {
- p_list->push_back( PropertyInfo( Variant::DICTIONARY, "samples/"+E->key(),PROPERTY_HINT_RESOURCE_TYPE,"Sample",PROPERTY_USAGE_NOEDITOR ) );
+ tpl.push_back( PropertyInfo( Variant::DICTIONARY, "samples/"+E->key(),PROPERTY_HINT_RESOURCE_TYPE,"Sample",PROPERTY_USAGE_NOEDITOR ) );
+ }
+
+ tpl.sort();
+ //sort so order is kept
+ for(List<PropertyInfo>::Element *E=tpl.front();E;E=E->next()) {
+ p_list->push_back(E->get());
}
}