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:
Diffstat (limited to 'src/slic3r/GUI/GUI_ObjectList.cpp')
-rw-r--r--src/slic3r/GUI/GUI_ObjectList.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/slic3r/GUI/GUI_ObjectList.cpp b/src/slic3r/GUI/GUI_ObjectList.cpp
index 9b1ee1cbf..69c855872 100644
--- a/src/slic3r/GUI/GUI_ObjectList.cpp
+++ b/src/slic3r/GUI/GUI_ObjectList.cpp
@@ -1758,12 +1758,9 @@ void ObjectList::load_mesh_object(const TriangleMesh &mesh, const wxString &name
new_object->invalidate_bounding_box();
new_object->translate(-bb.center());
- if (center) {
- const BoundingBoxf bed_shape = wxGetApp().plater()->bed_shape_bb();
- new_object->instances[0]->set_offset(Slic3r::to_3d(bed_shape.center().cast<double>(), -new_object->origin_translation.z()));
- } else {
- new_object->instances[0]->set_offset(bb.center());
- }
+ new_object->instances[0]->set_offset(center ?
+ to_3d(wxGetApp().plater()->build_volume().bounding_volume2d().center(), -new_object->origin_translation.z()) :
+ bb.center());
new_object->ensure_on_bed();