From aea6681adf122d514fecb668fa3a43aada76042a Mon Sep 17 00:00:00 2001 From: Enrico Turri <enricoturri@seznam.cz> Date: Thu, 24 Jan 2019 10:52:48 +0100 Subject: [PATCH] Fixed visual hints orientation for sidebar rotation fields and single full instance selection --- src/slic3r/GUI/GLCanvas3D.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/slic3r/GUI/GLCanvas3D.cpp b/src/slic3r/GUI/GLCanvas3D.cpp index 63b9864b7..f3de5a739 100644 --- a/src/slic3r/GUI/GLCanvas3D.cpp +++ b/src/slic3r/GUI/GLCanvas3D.cpp @@ -2172,7 +2172,7 @@ void GLCanvas3D::Selection::render_sidebar_hints(const std::string& sidebar_fiel if (is_single_full_instance()) { ::glTranslated(center(0), center(1), center(2)); - if (boost::starts_with(sidebar_field, "scale") || boost::starts_with(sidebar_field, "size")) + if (!boost::starts_with(sidebar_field, "position")) { Transform3d orient_matrix = (*m_volumes)[*m_list.begin()]->get_instance_transformation().get_matrix(true, false, true, true); ::glMultMatrixd(orient_matrix.data()); @@ -2181,9 +2181,7 @@ void GLCanvas3D::Selection::render_sidebar_hints(const std::string& sidebar_fiel else if (is_single_volume() || is_single_modifier()) { Transform3d orient_matrix = (*m_volumes)[*m_list.begin()]->get_instance_transformation().get_matrix(true, false, true, true); - const Vec3d& offset = get_bounding_box().center(); - - ::glTranslated(offset(0), offset(1), offset(2)); + ::glTranslated(center(0), center(1), center(2)); ::glMultMatrixd(orient_matrix.data()); } else