Fix of #7155 (broken loading of configs from <=1.41.3)
This commit is contained in:
parent
7e780380ee
commit
22f3682c0f
2 changed files with 12 additions and 2 deletions
|
@ -916,7 +916,12 @@ namespace Slic3r {
|
|||
}
|
||||
//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.
|
||||
config_substitutions.substitutions = config.load_from_ini_string_commented(std::move(buffer), 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.
|
||||
//config_substitutions.substitutions = config.load_from_ini_string_commented(std::move(buffer), config_substitutions.rule);
|
||||
ConfigBase::load_from_gcode_string_legacy(config, buffer.data(), config_substitutions);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue