Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbubnikv <bubnikv@gmail.com>2017-06-08 18:46:28 +0300
committerbubnikv <bubnikv@gmail.com>2017-06-08 18:46:28 +0300
commitdd41406a55e9a5cdec11f1c5025593f1712b5495 (patch)
tree44aad98bbbd8294d6840c9b11e15605172186ca7 /xs/src/libslic3r/PrintObject.cpp
parent89dcd3e8b11deda08d4f63cdd028c12c31c44a5b (diff)
Fixed regression in invalidation of slicing steps.
Diffstat (limited to 'xs/src/libslic3r/PrintObject.cpp')
-rw-r--r--xs/src/libslic3r/PrintObject.cpp36
1 files changed, 17 insertions, 19 deletions
diff --git a/xs/src/libslic3r/PrintObject.cpp b/xs/src/libslic3r/PrintObject.cpp
index 8942f0d10..08a825421 100644
--- a/xs/src/libslic3r/PrintObject.cpp
+++ b/xs/src/libslic3r/PrintObject.cpp
@@ -91,7 +91,9 @@ bool PrintObject::set_copies(const Points &points)
this->_shifted_copies.push_back(copy);
}
- return this->_print->invalidate_step(psSkirt) || this->_print->invalidate_step(psBrim);
+ bool invalidated = this->_print->invalidate_step(psSkirt);
+ invalidated |= this->_print->invalidate_step(psBrim);
+ return invalidated;
}
bool PrintObject::reload_model_instances()
@@ -137,6 +139,7 @@ bool PrintObject::invalidate_state_by_config_options(const std::vector<t_config_
return false;
std::vector<PrintObjectStep> steps;
+ bool invalidated = false;
for (const t_config_option_key &opt_key : opt_keys) {
if ( opt_key == "perimeters"
|| opt_key == "extra_perimeters"
@@ -232,11 +235,11 @@ bool PrintObject::invalidate_state_by_config_options(const std::vector<t_config_
} else {
// for legacy, if we can't handle this option let's invalidate all steps
this->reset_layer_height_profile();
- return this->invalidate_all_steps();
+ this->invalidate_all_steps();
+ invalidated = true;
}
}
-
- bool invalidated = false;
+
sort_remove_duplicates(steps);
for (PrintObjectStep step : steps)
invalidated |= this->invalidate_step(step);
@@ -249,25 +252,20 @@ bool PrintObject::invalidate_step(PrintObjectStep step)
// propagate to dependent steps
if (step == posPerimeters) {
- invalidated |=
- this->invalidate_step(posPrepareInfill) ||
- this->_print->invalidate_step(psSkirt) ||
- this->_print->invalidate_step(psBrim);
+ invalidated |= this->invalidate_step(posPrepareInfill);
+ invalidated |= this->_print->invalidate_step(psSkirt);
+ invalidated |= this->_print->invalidate_step(psBrim);
} else if (step == posPrepareInfill) {
- invalidated |=
- this->invalidate_step(posInfill);
+ invalidated |= this->invalidate_step(posInfill);
} else if (step == posInfill) {
- invalidated |=
- this->_print->invalidate_step(psSkirt) ||
- this->_print->invalidate_step(psBrim);
+ invalidated |= this->_print->invalidate_step(psSkirt);
+ invalidated |= this->_print->invalidate_step(psBrim);
} else if (step == posSlice) {
- invalidated |=
- this->invalidate_step(posPerimeters) ||
- this->invalidate_step(posSupportMaterial);
+ invalidated |= this->invalidate_step(posPerimeters);
+ invalidated |= this->invalidate_step(posSupportMaterial);
} else if (step == posSupportMaterial) {
- invalidated |=
- this->_print->invalidate_step(psSkirt) ||
- this->_print->invalidate_step(psBrim);
+ invalidated |= this->_print->invalidate_step(psSkirt);
+ invalidated |= this->_print->invalidate_step(psBrim);
}
// Wipe tower depends on the ordering of extruders, which in turn depends on everything.