mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-12 01:07:57 -06:00
Fix regression that shell is not rendered unless slice is completed (#3181)
* Fix issue that `is_update_alpha` doesn't work * Fix regression that shell is not rendered unless slice is completed * Format
This commit is contained in:
parent
3ee42f42da
commit
871f163a32
2 changed files with 9 additions and 7 deletions
|
@ -1163,14 +1163,15 @@ void GLVolumeCollection::update_colors_by_extruder(const DynamicPrintConfig *con
|
||||||
const ColorItem& color = colors[extruder_id];
|
const ColorItem& color = colors[extruder_id];
|
||||||
if (!color.first.empty()) {
|
if (!color.first.empty()) {
|
||||||
if (!is_update_alpha) {
|
if (!is_update_alpha) {
|
||||||
float old_a = color.second.a();
|
float old_a = volume->color.a();
|
||||||
volume->color = color.second;
|
volume->color = color.second;
|
||||||
volume->color.a(old_a);
|
volume->color.a(old_a);
|
||||||
}
|
} else {
|
||||||
volume->color = color.second;
|
volume->color = color.second;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void GLVolumeCollection::set_transparency(float alpha)
|
void GLVolumeCollection::set_transparency(float alpha)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1242,11 +1242,12 @@ void GCodeViewer::render(int canvas_width, int canvas_height, int right_margin)
|
||||||
m_statistics.total_instances_gpu_size = 0;
|
m_statistics.total_instances_gpu_size = 0;
|
||||||
#endif // ENABLE_GCODE_VIEWER_STATISTICS
|
#endif // ENABLE_GCODE_VIEWER_STATISTICS
|
||||||
|
|
||||||
|
glsafe(::glEnable(GL_DEPTH_TEST));
|
||||||
|
render_shells();
|
||||||
|
|
||||||
if (m_roles.empty())
|
if (m_roles.empty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
glsafe(::glEnable(GL_DEPTH_TEST));
|
|
||||||
render_shells();
|
|
||||||
render_toolpaths();
|
render_toolpaths();
|
||||||
float legend_height = 0.0f;
|
float legend_height = 0.0f;
|
||||||
render_legend(legend_height, canvas_width, canvas_height, right_margin);
|
render_legend(legend_height, canvas_width, canvas_height, right_margin);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue