From b32202e59737d881d4ccf43586e7faf2985ce1fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Hejl?= Date: Wed, 16 Jun 2021 13:41:35 +0200 Subject: [PATCH] Fixed incorrectly displayed custom supports and seams in the support and seam gizmos after 7377fc34acef999774333466db18858a1dae5512. --- src/slic3r/GUI/Gizmos/GLGizmoPainterBase.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/slic3r/GUI/Gizmos/GLGizmoPainterBase.cpp b/src/slic3r/GUI/Gizmos/GLGizmoPainterBase.cpp index 3f8d5a007..9f0c108be 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoPainterBase.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoPainterBase.cpp @@ -113,9 +113,12 @@ void GLGizmoPainterBase::render_triangles(const Selection& selection, const bool { const ModelObject* mo = m_c->selection_info()->model_object(); + ScopeGuard offset_fill_guard([&use_polygon_offset_fill]() { + if (use_polygon_offset_fill) + glsafe(::glDisable(GL_POLYGON_OFFSET_FILL)); + }); if (use_polygon_offset_fill) { glsafe(::glEnable(GL_POLYGON_OFFSET_FILL)); - ScopeGuard offset_fill_guard([]() { glsafe(::glDisable(GL_POLYGON_OFFSET_FILL)); }); glsafe(::glPolygonOffset(-5.0, -5.0)); }