mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-12 09:17:52 -06:00
Load presets into the new C++ class.
This commit is contained in:
parent
b1e3b0cdf9
commit
84d4bf8fdb
6 changed files with 57 additions and 3 deletions
|
@ -188,7 +188,8 @@ void ConfigBase::apply(const ConfigBase &other, const t_config_option_keys &keys
|
|||
continue;
|
||||
}
|
||||
// not the most efficient way, but easier than casting pointers to subclasses
|
||||
if (! my_opt->deserialize(other.option(key)->serialize()))
|
||||
const ConfigOption *other_opt = other.option(key);
|
||||
if (other_opt != nullptr && ! my_opt->deserialize(other_opt->serialize()))
|
||||
CONFESS((std::string("Unexpected failure when deserializing serialized value for ") + key).c_str());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue