ENH: config: add some miss codes
previous commit 'ENH: config: add nill load/save logic for user config' jira: no-jira Change-Id: I91ab326e533d54846518d11b457db0b0afe4d499
This commit is contained in:
parent
603f93d97f
commit
4086ec60c2
|
@ -550,6 +550,8 @@ public:
|
|||
if (inherits->size() != rhs->size())
|
||||
throw ConfigurationError("ConfigOptionVector::set_with_nil(): rhs size different with inherits size");
|
||||
|
||||
this->values.resize(inherits->size(), this->values.front());
|
||||
|
||||
for (size_t i = 0; i < inherits_opt->size(); i= i+stride) {
|
||||
bool set_nil = true;
|
||||
for (size_t j = 0; j < stride; j++) {
|
||||
|
|
|
@ -544,7 +544,9 @@ bool Preset::save(DynamicPrintConfig* parent_config)
|
|||
ConfigOptionVectorBase* opt_vec_src = static_cast<ConfigOptionVectorBase*>(opt_src);
|
||||
ConfigOptionVectorBase* opt_vec_dst = static_cast<ConfigOptionVectorBase*>(opt_dst);
|
||||
ConfigOptionVectorBase* opt_vec_inherit = static_cast<ConfigOptionVectorBase*>(parent_config->option(option));
|
||||
if (key_set1->find(option) != key_set1->end()) {
|
||||
if (opt_vec_src->size() == 1)
|
||||
opt_dst->set(opt_src);
|
||||
else if (key_set1->find(option) != key_set1->end()) {
|
||||
opt_vec_dst->set_with_nil(opt_vec_src, opt_vec_inherit, 1);
|
||||
}
|
||||
else if (key_set2->find(option) != key_set2->end()) {
|
||||
|
|
Loading…
Reference in New Issue