mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-05-14 19:12:38 -07:00
Fixed position of instances after paste object
This commit is contained in:
@@ -1863,7 +1863,12 @@ void Selection::paste_objects_from_clipboard()
|
||||
{
|
||||
ModelObject* dst_object = m_model->add_object(*src_object);
|
||||
double offset = wxGetApp().plater()->canvas3D()->get_size_proportional_to_max_bed_size(0.05);
|
||||
dst_object->translate(offset, offset, 0.0);
|
||||
Vec3d displacement(offset, offset, 0.0);
|
||||
for (ModelInstance* inst : dst_object->instances)
|
||||
{
|
||||
inst->set_offset(inst->get_offset() + displacement);
|
||||
}
|
||||
|
||||
object_idxs.push_back(m_model->objects.size() - 1);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user