mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-16 18:12:10 +00:00
FIX: Set non-empty default value to some vector options
Jira: STUDIO-13310 Change-Id: I316f4508d11288e287a6f8738a3c8fe9f45fada9 (cherry picked from commit 9f1887791543f0de139221887ce45c65e8a111fc)
This commit is contained in:
@@ -455,8 +455,12 @@ void ConfigBase::apply_only(const ConfigBase &other, const t_config_option_keys
|
||||
auto opt_key2 = opt_key.substr(0, n);
|
||||
auto my_opt2 = dynamic_cast<ConfigOptionVectorBase*>(this->option(opt_key2));
|
||||
auto other_opt = other.option(opt_key2);
|
||||
if (my_opt2 == nullptr && other_opt)
|
||||
if (my_opt2 == nullptr && other_opt) {
|
||||
my_opt2 = dynamic_cast<ConfigOptionVectorBase *>(this->option(opt_key2, true));
|
||||
if (my_opt2->empty()) {
|
||||
my_opt2->resize(1, other_opt);
|
||||
}
|
||||
}
|
||||
if (my_opt2) {
|
||||
int index = std::atoi(opt_key.c_str() + n + 1);
|
||||
if (other_opt)
|
||||
|
||||
Reference in New Issue
Block a user