diff --git a/src/slic3r/GUI/3DScene.cpp b/src/slic3r/GUI/3DScene.cpp index cb7ff02fd2..2e0d224fde 100644 --- a/src/slic3r/GUI/3DScene.cpp +++ b/src/slic3r/GUI/3DScene.cpp @@ -1162,13 +1162,14 @@ void GLVolumeCollection::update_colors_by_extruder(const DynamicPrintConfig *con const ColorItem& color = colors[extruder_id]; if (!color.first.empty()) { - if (!is_update_alpha) { - float old_a = color.second.a(); + if (!is_update_alpha) { + float old_a = volume->color.a(); volume->color = color.second; volume->color.a(old_a); - } - volume->color = color.second; - } + } else { + volume->color = color.second; + } + } } } diff --git a/src/slic3r/GUI/GCodeViewer.cpp b/src/slic3r/GUI/GCodeViewer.cpp index e703a4051d..1e607bd5f1 100644 --- a/src/slic3r/GUI/GCodeViewer.cpp +++ b/src/slic3r/GUI/GCodeViewer.cpp @@ -1242,11 +1242,12 @@ void GCodeViewer::render(int canvas_width, int canvas_height, int right_margin) m_statistics.total_instances_gpu_size = 0; #endif // ENABLE_GCODE_VIEWER_STATISTICS + glsafe(::glEnable(GL_DEPTH_TEST)); + render_shells(); + if (m_roles.empty()) return; - glsafe(::glEnable(GL_DEPTH_TEST)); - render_shells(); render_toolpaths(); float legend_height = 0.0f; render_legend(legend_height, canvas_width, canvas_height, right_margin);