Merge pull request #7557 from RandomShaper/ordered-image-group-files-2.1
Make image-groups map in export.cfg ordered (2.1)
This commit is contained in:
commit
0669c9816e
1 changed files with 12 additions and 4 deletions
|
@ -2092,13 +2092,21 @@ void EditorImportExport::save_config() {
|
||||||
|
|
||||||
if (image_groups.size() && image_group_files.size()){
|
if (image_groups.size() && image_group_files.size()){
|
||||||
|
|
||||||
Vector<String> igfsave;
|
Vector<String> igfkeys;
|
||||||
igfsave.resize(image_group_files.size()*2);
|
igfkeys.resize(image_group_files.size());
|
||||||
int idx=0;
|
int idx=0;
|
||||||
for (Map<StringName,StringName>::Element *E=image_group_files.front();E;E=E->next()) {
|
for (Map<StringName,StringName>::Element *E=image_group_files.front();E;E=E->next()) {
|
||||||
|
igfkeys[idx++]=E->key();
|
||||||
|
}
|
||||||
|
igfkeys.sort();
|
||||||
|
|
||||||
igfsave[idx++]=E->key();
|
Vector<String> igfsave;
|
||||||
igfsave[idx++]=E->get();
|
igfsave.resize(image_group_files.size()*2);
|
||||||
|
idx=0;
|
||||||
|
for (int i=0;i<igfkeys.size();++i) {
|
||||||
|
|
||||||
|
igfsave[idx++]=igfkeys[i];
|
||||||
|
igfsave[idx++]=image_group_files[igfkeys[i]];
|
||||||
}
|
}
|
||||||
cf->set_value("image_group_files","files",igfsave);
|
cf->set_value("image_group_files","files",igfsave);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue