mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-14 06:26:06 +08:00
Fix of a crash when deleting an object while it is edited
with the smooth variable layer editing tool.
This commit is contained in:
parent
e515ef4fbe
commit
045879f68a
@ -261,7 +261,7 @@ void GLCanvas3D::LayersEditing::select_object(const Model &model, int object_id)
|
|||||||
// Maximum height of an object changes when the object gets rotated or scaled.
|
// Maximum height of an object changes when the object gets rotated or scaled.
|
||||||
// Changing maximum height of an object will invalidate the layer heigth editing profile.
|
// Changing maximum height of an object will invalidate the layer heigth editing profile.
|
||||||
// m_model_object->raw_bounding_box() is cached, therefore it is cheap even if this method is called frequently.
|
// m_model_object->raw_bounding_box() is cached, therefore it is cheap even if this method is called frequently.
|
||||||
float new_max_z = (m_model_object == nullptr) ? 0.f : m_model_object->raw_bounding_box().size().z();
|
float new_max_z = (model_object_new == nullptr) ? 0.f : model_object_new->raw_bounding_box().size().z();
|
||||||
if (m_model_object != model_object_new || this->last_object_id != object_id || m_object_max_z != new_max_z ||
|
if (m_model_object != model_object_new || this->last_object_id != object_id || m_object_max_z != new_max_z ||
|
||||||
(model_object_new != nullptr && m_model_object->id() != model_object_new->id())) {
|
(model_object_new != nullptr && m_model_object->id() != model_object_new->id())) {
|
||||||
m_layer_height_profile.clear();
|
m_layer_height_profile.clear();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user