Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Matena <lukasmatena@seznam.cz>2021-10-22 18:04:08 +0300
committerLukas Matena <lukasmatena@seznam.cz>2021-10-22 18:04:08 +0300
commit22f3682c0f9e5dc5678d9653d3c9dc7ec54b8f6f (patch)
tree021b869af64ce047d49643a86ccf924b71f18ed5 /src/libslic3r/Format/AMF.cpp
parent7e780380eee2fb046a44753e3b34501ae1011b36 (diff)
Fix of #7155 (broken loading of configs from <=1.41.3)
Diffstat (limited to 'src/libslic3r/Format/AMF.cpp')
-rw-r--r--src/libslic3r/Format/AMF.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/libslic3r/Format/AMF.cpp b/src/libslic3r/Format/AMF.cpp
index bcc5c8b4a..235cdecb5 100644
--- a/src/libslic3r/Format/AMF.cpp
+++ b/src/libslic3r/Format/AMF.cpp
@@ -711,7 +711,12 @@ void AMFParserContext::endElement(const char * /* name */)
if ((m_config != nullptr) && strncmp(m_value[0].c_str(), SLIC3R_CONFIG_TYPE, strlen(SLIC3R_CONFIG_TYPE)) == 0) {
//FIXME Loading a "will be one day a legacy format" of configuration in a form of a G-code comment.
// Each config line is prefixed with a semicolon (G-code comment), that is ugly.
- m_config_substitutions->substitutions = m_config->load_from_ini_string_commented(std::move(m_value[1].c_str()), m_config_substitutions->rule);
+
+ // Replacing the legacy function with load_from_ini_string_commented leads to issues when
+ // parsing 3MFs from before PrusaSlicer 2.0.0 (which can have duplicated entries in the INI.
+ // See https://github.com/prusa3d/PrusaSlicer/issues/7155. We'll revert it for now.
+ //m_config_substitutions->substitutions = m_config->load_from_ini_string_commented(std::move(m_value[1].c_str()), m_config_substitutions->rule);
+ ConfigBase::load_from_gcode_string_legacy(*m_config, std::move(m_value[1].c_str()), *m_config_substitutions);
}
else if (strncmp(m_value[0].c_str(), "slic3r.", 7) == 0) {
const char *opt_key = m_value[0].c_str() + 7;