ENH: do not clone object to plate boundary

Jira: none
Change-Id: I72f33d7633bd6ccd43cabbfd0262818b1655c21b
(cherry picked from commit 99ea969b30a25ddd063da5fb0e246ce01d4b6764)
This commit is contained in:
Arthur
2023-10-13 18:05:52 +08:00
committed by Lane.Wei
parent af1af05a98
commit 63c33c90e6
2 changed files with 8 additions and 6 deletions

View File

@@ -458,10 +458,12 @@ void Selection::remove_curr_plate()
void Selection::clone(int numbers)
{
if (numbers > 0)
wxGetApp().plater()->take_snapshot(std::string("Selection-clone"));
if (numbers <= 0)
return;
wxGetApp().plater()->take_snapshot(std::string("Selection-clone"));
copy_to_clipboard();
for (int i = 0; i < numbers; i++) {
copy_to_clipboard();
paste_from_clipboard();
}
}
@@ -2722,7 +2724,7 @@ void Selection::paste_objects_from_clipboard()
{
const ModelObject *src_object = src_objects[i];
ModelObject* dst_object = m_model->add_object(*src_object);
// BBS: find an empty cell to put the copied object
BoundingBoxf3 bbox = src_object->instance_convex_hull_bounding_box(0);