diff options
author | Lukas Matena <lukasmatena@seznam.cz> | 2020-02-27 16:36:56 +0300 |
---|---|---|
committer | Lukas Matena <lukasmatena@seznam.cz> | 2020-02-27 17:18:15 +0300 |
commit | 73ad48c135f7ce167a858542fdaacd34d36b99c6 (patch) | |
tree | d7d4ef986382f628e30061af2d4e6ab141541595 /src/slic3r/GUI | |
parent | 08a6c86326b782b6c098f3f374971c53bdaab271 (diff) |
Small fix of clipping plane positioning
If the clipping plane is moved automatically after hollowed mesh was created, move the clipping plane and fix current direction so it is not reset when user wants to move it
This is a quick solution for the 2.2.0 release. It should be later refactored as mentioned in the code.
Diffstat (limited to 'src/slic3r/GUI')
-rw-r--r-- | src/slic3r/GUI/Gizmos/GLGizmoHollow.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/slic3r/GUI/Gizmos/GLGizmoHollow.cpp b/src/slic3r/GUI/Gizmos/GLGizmoHollow.cpp index b97a6f4bc..5f3430a78 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoHollow.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoHollow.cpp @@ -62,6 +62,14 @@ void GLGizmoHollow::set_sla_support_data(ModelObject*, const Selection&) update_clipping_plane(m_c->m_clipping_plane_was_moved); + // This is a temporary and not very nice hack, to make sure that + // if the cp was moved by the data returned by backend, it will + // remember its direction. FIXME: Refactor this mess and make + // the clipping plane itself part of the shared data. + if (! m_c->m_clipping_plane_was_moved && m_c->m_clipping_plane_distance == 0.25f) + m_c->m_clipping_plane_was_moved = true; + + if (m_c->m_model_object) { reload_cache(); if (m_c->has_drilled_mesh()) |