diff options
author | Enrico Turri <enricoturri@seznam.cz> | 2019-05-20 11:33:49 +0300 |
---|---|---|
committer | Enrico Turri <enricoturri@seznam.cz> | 2019-05-20 11:33:49 +0300 |
commit | 0132313ee0cc6336eb6d40cf52db156d4f3f701b (patch) | |
tree | 35b9d03a0c3c6f5cb5a5f767553b75a59c8b0cc7 | |
parent | 7bb79062e69fb37649909ce707f71663d9c74ae6 (diff) |
Fixed position of instances after paste object
-rw-r--r-- | src/slic3r/GUI/Selection.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/slic3r/GUI/Selection.cpp b/src/slic3r/GUI/Selection.cpp index 77890f9e7..0b880c75f 100644 --- a/src/slic3r/GUI/Selection.cpp +++ b/src/slic3r/GUI/Selection.cpp @@ -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); } |