diff options
Diffstat (limited to 'xs/src/slic3r/GUI/GLGizmo.cpp')
-rw-r--r-- | xs/src/slic3r/GUI/GLGizmo.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/xs/src/slic3r/GUI/GLGizmo.cpp b/xs/src/slic3r/GUI/GLGizmo.cpp index f4f947d9c..eaf24c8bc 100644 --- a/xs/src/slic3r/GUI/GLGizmo.cpp +++ b/xs/src/slic3r/GUI/GLGizmo.cpp @@ -262,11 +262,10 @@ void GLGizmoRotate::on_render(const BoundingBoxf3& box) const { ::glDisable(GL_DEPTH_TEST); - const Pointf size = box.size().xy(); - m_center = box.center().xy(); + m_center = to_2d(box.center()); if (!m_keep_radius) { - m_radius = Offset + ::sqrt(sqr(0.5f * size(0)) + sqr(0.5f * size(1))); + m_radius = Offset + 0.5 * to_2d(box.size()).norm(); m_keep_radius = true; } |