mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-08 23:46:24 -06:00
FIX: keep only one repeated opt_key
keep only one repeated opt_key when old software open new 3mf file Change-Id: I4f35d2f15e0cb9e5fa4a7523cfcba7b601afd795 (cherry picked from commit a25c42f31437b4562b8fe71a836a421c014c6cf9)
This commit is contained in:
parent
264aad9b4b
commit
e5c3127517
1 changed files with 4 additions and 2 deletions
|
@ -534,8 +534,10 @@ 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
|
//BBS: record these options, keep only one repeated opt_key
|
||||||
substitutions_ctxt.unrecogized_keys.push_back(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())
|
||||||
|
substitutions_ctxt.unrecogized_keys.push_back(opt_key_src);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return this->set_deserialize_raw(opt_key, value, substitutions_ctxt, append);
|
return this->set_deserialize_raw(opt_key, value, substitutions_ctxt, append);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue