FIX: model copy problem

Change-Id: I1e32a5a89271a4bdc100599bb6a513e48c545313
(cherry picked from commit eb3755126a2df23045857e4081ba50a42ca5168c)
This commit is contained in:
zhimin.zeng 2022-10-19 15:04:03 +08:00 committed by Lane.Wei
parent 9ca84ba948
commit 915e5a0e69

View file

@ -2707,7 +2707,7 @@ void Selection::paste_objects_from_clipboard()
auto start_offset = in_current ? src_object->instances.front()->get_offset() : plate->get_build_volume().center(); auto start_offset = in_current ? src_object->instances.front()->get_offset() : plate->get_build_volume().center();
auto point_offset = start_offset - start_point; auto point_offset = start_offset - start_point;
auto empty_cell = wxGetApp().plater()->canvas3D()->get_nearest_empty_cell({start_point(0), start_point(1)}, {bbox.size()(0)+1, bbox.size()(1)+1}); auto empty_cell = wxGetApp().plater()->canvas3D()->get_nearest_empty_cell({start_point(0), start_point(1)}, {bbox.size()(0)+1, bbox.size()(1)+1});
displacement = {empty_cell.x() + point_offset.x(), empty_cell.y() + point_offset.y(), start_point(2)}; displacement = {empty_cell.x() + point_offset.x(), empty_cell.y() + point_offset.y(), start_offset(2)};
} }
for (ModelInstance* inst : dst_object->instances) for (ModelInstance* inst : dst_object->instances)