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:
Diffstat (limited to 'xs/src/libslic3r/Print.cpp')
-rw-r--r--xs/src/libslic3r/Print.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/xs/src/libslic3r/Print.cpp b/xs/src/libslic3r/Print.cpp
index a7153c181..712570ff9 100644
--- a/xs/src/libslic3r/Print.cpp
+++ b/xs/src/libslic3r/Print.cpp
@@ -401,8 +401,6 @@ bool Print::apply_config(DynamicPrintConfig config)
// The layer_height_profile is not valid for some reason (updated by the user or invalidated due to some option change).
// Invalidate the slicing step, which in turn invalidates everything.
object->invalidate_step(posSlice);
- // Following line sets the layer_height_profile_valid flag.
- object->update_layer_height_profile();
// Trigger recalculation.
invalidated = true;
}
@@ -478,13 +476,15 @@ exit_for_rearrange_regions:
for (PrintObject *object : this->objects)
model_objects.push_back(object->model_object());
this->clear_objects();
- for (ModelObject *mo : model_objects) {
+ for (ModelObject *mo : model_objects)
this->add_model_object(mo);
- // Update layer_height_profile from the main thread as it may pull the data from the associated ModelObject.
- this->objects.back()->update_layer_height_profile();
- }
invalidated = true;
}
+
+ // Always make sure that the layer_height_profiles are set, as they should not be modified from the worker threads.
+ for (PrintObject *object : this->objects)
+ if (! object->layer_height_profile_valid)
+ object->update_layer_height_profile();
return invalidated;
}