Fix no action on sla archive import with "profile only" option

This commit is contained in:
tamasmeszaros 2023-05-10 17:05:05 +02:00
parent e3dcae6798
commit 8f680fd496
2 changed files with 10 additions and 3 deletions

View File

@ -438,7 +438,7 @@ ConfigSubstitutions SL1Reader::read(std::vector<ExPolygons> &slices,
ConfigSubstitutions SL1Reader::read(DynamicPrintConfig &out) ConfigSubstitutions SL1Reader::read(DynamicPrintConfig &out)
{ {
ZipperArchive arch = read_zipper_archive(m_fname, {}, {"png"}); ZipperArchive arch = read_zipper_archive(m_fname, {"ini"}, {"png", "thumbnail"});
return out.load(arch.profile, ForwardCompatibilitySubstitutionRule::Enable); return out.load(arch.profile, ForwardCompatibilitySubstitutionRule::Enable);
} }

View File

@ -83,8 +83,15 @@ ZipperArchive read_zipper_archive(const std::string &zipfname,
})) }))
continue; continue;
if (name == CONFIG_FNAME) { arch.config = read_ini(entry, zip); continue; } if (name == CONFIG_FNAME) {
if (name == PROFILE_FNAME) { arch.profile = read_ini(entry, zip); continue; } arch.config = read_ini(entry, zip);
continue;
}
if (name == PROFILE_FNAME) {
arch.profile = read_ini(entry, zip);
continue;
}
auto it = std::lower_bound( auto it = std::lower_bound(
arch.entries.begin(), arch.entries.end(), arch.entries.begin(), arch.entries.end(),