mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-20 21:27:52 -06:00
Fix of a crash intruduced with e8247c5646
This commit is contained in:
parent
076b293fec
commit
a9499ae45c
4 changed files with 29 additions and 15 deletions
|
@ -188,6 +188,14 @@ void Preset::normalize(DynamicPrintConfig &config)
|
|||
if (opt != nullptr && opt->is_vector())
|
||||
static_cast<ConfigOptionVectorBase*>(opt)->resize(n, defaults.option(key));
|
||||
}
|
||||
// The following keys are mandatory for the UI, but they are not part of FullPrintConfig, therefore they are handled separately.
|
||||
for (const std::string &key : { "filament_settings_id" }) {
|
||||
auto *opt = config.option(key, false);
|
||||
assert(opt != nullptr);
|
||||
assert(opt->type() == coStrings);
|
||||
if (opt != nullptr && opt->type() == coStrings)
|
||||
static_cast<ConfigOptionStrings*>(opt)->values.resize(n, std::string());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue