Fixed a variable layer height profile update issue.
https://github.com/prusa3d/Slic3r/issues/358
This commit is contained in:
parent
aa54c3402b
commit
cb43f19a90
@ -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,14 +476,16 @@ 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;
|
||||
}
|
||||
|
||||
|
@ -1468,6 +1468,7 @@ void PrintObject::reset_layer_height_profile()
|
||||
{
|
||||
// Reset the layer_heigth_profile.
|
||||
this->layer_height_profile.clear();
|
||||
this->layer_height_profile_valid = false;
|
||||
// Reset the source layer_height_profile if it exists at the ModelObject.
|
||||
this->model_object()->layer_height_profile.clear();
|
||||
this->model_object()->layer_height_profile_valid = false;
|
||||
|
Loading…
Reference in New Issue
Block a user