From 0481f33ceb4dd64098e3b0c9c324bc32a82ba5f3 Mon Sep 17 00:00:00 2001 From: Lukas Matena Date: Wed, 19 Jun 2019 11:52:37 +0200 Subject: [PATCH] Drop to bed function now accounts for instance transformation --- src/slic3r/GUI/GUI_ObjectManipulation.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/slic3r/GUI/GUI_ObjectManipulation.cpp b/src/slic3r/GUI/GUI_ObjectManipulation.cpp index 7363b2c16..d5445c6af 100644 --- a/src/slic3r/GUI/GUI_ObjectManipulation.cpp +++ b/src/slic3r/GUI/GUI_ObjectManipulation.cpp @@ -348,7 +348,8 @@ ObjectManipulation::ObjectManipulation(wxWindow* parent) : if (selection.is_single_volume() || selection.is_single_modifier()) { const GLVolume* volume = selection.get_volume(*selection.get_volume_idxs().begin()); - Vec3d diff = m_cache.position - Vec3d(0., 0., get_volume_min_z(volume)); + const Geometry::Transformation& instance_trafo = volume->get_instance_transformation(); + Vec3d diff = m_cache.position - instance_trafo.get_matrix(true).inverse() * Vec3d(0., 0., get_volume_min_z(volume)); change_position_value(0, diff.x()); change_position_value(1, diff.y());