From 5f2afad95eaa6dfeb81e772f37adfa1d0812788f Mon Sep 17 00:00:00 2001 From: Enrico Turri Date: Tue, 4 Sep 2018 12:41:14 +0200 Subject: [PATCH] Fixed render of picking pass for flatten gizmo --- xs/src/slic3r/GUI/GLGizmo.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/xs/src/slic3r/GUI/GLGizmo.cpp b/xs/src/slic3r/GUI/GLGizmo.cpp index be085e913..2980e34a1 100644 --- a/xs/src/slic3r/GUI/GLGizmo.cpp +++ b/xs/src/slic3r/GUI/GLGizmo.cpp @@ -1031,8 +1031,6 @@ void GLGizmoFlatten::on_render(const BoundingBoxf3& box) const Vec3d dragged_offset = box.center() - *m_center; - bool blending_was_enabled = ::glIsEnabled(GL_BLEND); - bool depth_test_was_enabled = ::glIsEnabled(GL_DEPTH_TEST); ::glEnable(GL_BLEND); ::glEnable(GL_DEPTH_TEST); @@ -1053,16 +1051,11 @@ void GLGizmoFlatten::on_render(const BoundingBoxf3& box) const ::glPopMatrix(); } } - - if (!blending_was_enabled) - ::glDisable(GL_BLEND); - if (!depth_test_was_enabled) - ::glDisable(GL_DEPTH_TEST); } void GLGizmoFlatten::on_render_for_picking(const BoundingBoxf3& box) const { - ::glDisable(GL_DEPTH_TEST); + ::glEnable(GL_DEPTH_TEST); for (unsigned int i = 0; i < m_planes.size(); ++i) {