summaryrefslogtreecommitdiff
path: root/tools/editor
diff options
context:
space:
mode:
authorPedro J. Estébanez <pedrojrulez@gmail.com>2017-01-16 19:00:48 +0100
committerPedro J. Estébanez <pedrojrulez@gmail.com>2017-01-16 20:22:35 +0100
commit757647670501833c4f550a224b5da51d39fb6b9f (patch)
treeb0d1e6968139ae45ab0d96103e98a1888595b993 /tools/editor
parent2c8a1729152f5bcb1cb81d24b1e642634bff7174 (diff)
Make image-groups map in export.cfg ordered
This improves the VCS experience because otherwise they change their order everytime producing spurious changes.
Diffstat (limited to 'tools/editor')
-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 d90a175811..b52390fe9e 100644
--- a/tools/editor/editor_import_export.cpp
+++ b/tools/editor/editor_import_export.cpp
@@ -2092,13 +2092,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);
}