From c29171790930a1a9f9b0374b6a5ab8ccec1e88a9 Mon Sep 17 00:00:00 2001 From: Lukas Matena Date: Tue, 18 Aug 2020 15:17:26 +0200 Subject: [PATCH] Forbid translation of objects when SLA/Hollow/FDM gizmos are active --- src/slic3r/GUI/GLCanvas3D.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/slic3r/GUI/GLCanvas3D.cpp b/src/slic3r/GUI/GLCanvas3D.cpp index 9bed5fde7..94f6f6ef3 100644 --- a/src/slic3r/GUI/GLCanvas3D.cpp +++ b/src/slic3r/GUI/GLCanvas3D.cpp @@ -3658,6 +3658,13 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt) { m_mouse.dragging = true; + // Translation of objects is forbidden when SLA supports/hollowing/fdm + // supports gizmo is active. + if (m_gizmos.get_current_type() == GLGizmosManager::SlaSupports + || m_gizmos.get_current_type() == GLGizmosManager::FdmSupports + || m_gizmos.get_current_type() == GLGizmosManager::Hollow) + return; + Vec3d cur_pos = m_mouse.drag.start_position_3D; // we do not want to translate objects if the user just clicked on an object while pressing shift to remove it from the selection and then drag if (m_selection.contains_volume(get_first_hover_volume_idx()))