mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-08 23:46:24 -06:00
FIX: fix the version key treated as unrecognized issue
Change-Id: I0c0a85cb021af54c150e505ed0e11ffa037ed9e6
This commit is contained in:
parent
867a5c982c
commit
157b081363
1 changed files with 2 additions and 2 deletions
|
@ -534,7 +534,7 @@ bool ConfigBase::set_deserialize_nothrow(const t_config_option_key &opt_key_src,
|
||||||
this->handle_legacy(opt_key, value);
|
this->handle_legacy(opt_key, value);
|
||||||
if (opt_key.empty()) {
|
if (opt_key.empty()) {
|
||||||
// Ignore the option.
|
// Ignore the option.
|
||||||
//BBS: record these options, keep only one repeated opt_key
|
//BBS: record these options, keep only one repeated opt_key
|
||||||
auto iter = std::find(substitutions_ctxt.unrecogized_keys.begin(), substitutions_ctxt.unrecogized_keys.end(), opt_key_src);
|
auto iter = std::find(substitutions_ctxt.unrecogized_keys.begin(), substitutions_ctxt.unrecogized_keys.end(), opt_key_src);
|
||||||
if (iter == substitutions_ctxt.unrecogized_keys.end())
|
if (iter == substitutions_ctxt.unrecogized_keys.end())
|
||||||
substitutions_ctxt.unrecogized_keys.push_back(opt_key_src);
|
substitutions_ctxt.unrecogized_keys.push_back(opt_key_src);
|
||||||
|
@ -757,7 +757,7 @@ int ConfigBase::load_from_json(const std::string &file, ConfigSubstitutionContex
|
||||||
if (boost::iequals(it.key(),BBL_JSON_KEY_VERSION)) {
|
if (boost::iequals(it.key(),BBL_JSON_KEY_VERSION)) {
|
||||||
key_values.emplace(BBL_JSON_KEY_VERSION, it.value());
|
key_values.emplace(BBL_JSON_KEY_VERSION, it.value());
|
||||||
}
|
}
|
||||||
if (boost::iequals(it.key(), BBL_JSON_KEY_IS_CUSTOM)) {
|
else if (boost::iequals(it.key(), BBL_JSON_KEY_IS_CUSTOM)) {
|
||||||
key_values.emplace(BBL_JSON_KEY_IS_CUSTOM, it.value());
|
key_values.emplace(BBL_JSON_KEY_IS_CUSTOM, it.value());
|
||||||
}
|
}
|
||||||
else if (boost::iequals(it.key(), BBL_JSON_KEY_NAME)) {
|
else if (boost::iequals(it.key(), BBL_JSON_KEY_NAME)) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue