mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-13 09:47:58 -06:00
FIX: filament override is not correct
Multiple filament slots does not change the actual filament settings Jira: 3797 Change-Id: Ib377b4c79aae731caa97b408e84a87a33b3bb155 (cherry picked from commit 7d704d8f0bae14f16087c77c1bd90946632330a6) (cherry picked from commit 43e8956a1ffc9e2afbc82fdb77565f0543ac8a68)
This commit is contained in:
parent
4c2754f4ee
commit
f964842d8f
1 changed files with 19 additions and 16 deletions
|
@ -534,23 +534,26 @@ public:
|
|||
}
|
||||
return false;
|
||||
}
|
||||
size_t i = 0;
|
||||
|
||||
size_t cnt = std::min(this->size(), rhs_vec->size());
|
||||
bool modified = false;
|
||||
for (; i < cnt; ++ i)
|
||||
if (! rhs_vec->is_nil(i) && this->values[i] != rhs_vec->values[i]) {
|
||||
this->values[i] = rhs_vec->values[i];
|
||||
modified = true;
|
||||
}
|
||||
for (; i < rhs_vec->size(); ++ i)
|
||||
if (! rhs_vec->is_nil(i)) {
|
||||
if (this->values.empty())
|
||||
this->values.resize(i + 1);
|
||||
else
|
||||
this->values.resize(i + 1, this->values.front());
|
||||
this->values[i] = rhs_vec->values[i];
|
||||
modified = true;
|
||||
}
|
||||
if (cnt < 1)
|
||||
return false;
|
||||
|
||||
if (this->values.empty())
|
||||
this->values.resize(rhs_vec->size());
|
||||
else
|
||||
this->values.resize(rhs_vec->size(), this->values.front());
|
||||
|
||||
bool modified = false;
|
||||
auto default_value = this->values[0];
|
||||
for (size_t i = 0; i < rhs_vec->size(); ++i) {
|
||||
if (!rhs_vec->is_nil(i)) {
|
||||
this->values[i] = rhs_vec->values[i];
|
||||
modified = true;
|
||||
} else {
|
||||
this->values[i] = default_value;
|
||||
}
|
||||
}
|
||||
return modified;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue