summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tools/editor/editor_import_export.cpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/tools/editor/editor_import_export.cpp b/tools/editor/editor_import_export.cpp
index a94604743c..6ef238920d 100644
--- a/tools/editor/editor_import_export.cpp
+++ b/tools/editor/editor_import_export.cpp
@@ -2094,13 +2094,21 @@ void EditorImportExport::save_config() {
if (image_groups.size() && image_group_files.size()){
- Vector<String> igfsave;
- igfsave.resize(image_group_files.size()*2);
+ Vector<String> igfkeys;
+ igfkeys.resize(image_group_files.size());
int idx=0;
for (Map<StringName,StringName>::Element *E=image_group_files.front();E;E=E->next()) {
+ igfkeys[idx++]=E->key();
+ }
+ igfkeys.sort();
+
+ Vector<String> igfsave;
+ igfsave.resize(image_group_files.size()*2);
+ idx=0;
+ for (int i=0;i<igfkeys.size();++i) {
- igfsave[idx++]=E->key();
- igfsave[idx++]=E->get();
+ igfsave[idx++]=igfkeys[i];
+ igfsave[idx++]=image_group_files[igfkeys[i]];
}
cf->set_value("image_group_files","files",igfsave);
}