From 8f680fd496aae568b539d8909b23ee07af8cfc9b Mon Sep 17 00:00:00 2001 From: tamasmeszaros Date: Wed, 10 May 2023 17:05:05 +0200 Subject: [PATCH] Fix no action on sla archive import with "profile only" option --- src/libslic3r/Format/SL1.cpp | 2 +- src/libslic3r/Format/ZipperArchiveImport.cpp | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/libslic3r/Format/SL1.cpp b/src/libslic3r/Format/SL1.cpp index e9fc058e8..6b7f57b7f 100644 --- a/src/libslic3r/Format/SL1.cpp +++ b/src/libslic3r/Format/SL1.cpp @@ -438,7 +438,7 @@ ConfigSubstitutions SL1Reader::read(std::vector &slices, 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); } diff --git a/src/libslic3r/Format/ZipperArchiveImport.cpp b/src/libslic3r/Format/ZipperArchiveImport.cpp index 2bd5f555b..657e420bb 100644 --- a/src/libslic3r/Format/ZipperArchiveImport.cpp +++ b/src/libslic3r/Format/ZipperArchiveImport.cpp @@ -83,8 +83,15 @@ ZipperArchive read_zipper_archive(const std::string &zipfname, })) continue; - if (name == CONFIG_FNAME) { arch.config = read_ini(entry, zip); continue; } - if (name == PROFILE_FNAME) { arch.profile = read_ini(entry, zip); continue; } + if (name == CONFIG_FNAME) { + arch.config = read_ini(entry, zip); + continue; + } + + if (name == PROFILE_FNAME) { + arch.profile = read_ini(entry, zip); + continue; + } auto it = std::lower_bound( arch.entries.begin(), arch.entries.end(),