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:
authorYuSanka <yusanka@gmail.com>2022-08-11 16:38:29 +0300
committerYuSanka <yusanka@gmail.com>2022-08-12 12:08:04 +0300
commit7ebd0bbb3be9a96a245c172dcae5e9b9458677da (patch)
tree149aede56067a4d432bc6d25bdf604a46f6a54d5
parent17e7b182ee13c72980beb6e0f4cf7889b1712b81 (diff)
Fix for #8668 - Don't set printable state on merge if all parts are unprintable
-rw-r--r--src/slic3r/GUI/GUI_ObjectList.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/slic3r/GUI/GUI_ObjectList.cpp b/src/slic3r/GUI/GUI_ObjectList.cpp
index 7d11113ac..d2e154eab 100644
--- a/src/slic3r/GUI/GUI_ObjectList.cpp
+++ b/src/slic3r/GUI/GUI_ObjectList.cpp
@@ -2148,8 +2148,12 @@ void ObjectList::merge(bool to_multipart_object)
const Vec3d mirror = transformation.get_mirror();
const Vec3d rotation = transformation.get_rotation();
- if (object->id() == (*m_objects)[obj_idxs.front()]->id())
+ if (object->id() == (*m_objects)[obj_idxs.front()]->id()) {
new_object->add_instance();
+ new_object->instances[0]->printable = false;
+ }
+ new_object->instances[0]->printable |= object->instances[0]->printable;
+
const Transform3d& volume_offset_correction = transformation.get_matrix();
// merge volumes
@@ -2214,6 +2218,9 @@ void ObjectList::merge(bool to_multipart_object)
add_object_to_list(m_objects->size() - 1);
select_item(m_objects_model->GetItemById(m_objects->size() - 1));
update_selections_on_canvas();
+
+ // update printable state for new volumes on canvas3D
+ wxGetApp().plater()->canvas3D()->update_instance_printable_state_for_object(int(model->objects.size()) - 1);
}
// merge all parts to the one single object
// all part's settings will be lost