Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorenricoturri1966 <enricoturri@seznam.cz>2021-01-05 13:58:48 +0300
committerenricoturri1966 <enricoturri@seznam.cz>2021-01-05 13:58:48 +0300
commitb93c2aea4494b25d6e138ee2d3f1c764bf80acb0 (patch)
tree8ff6cdfab5d74fb27065431c7a03c546ff6c0401
parenta62940191622d6bffe588437fbeccb9b6a92f65c (diff)
#5690 - Fixed thumbnail generation when a gizmo is active
-rw-r--r--src/slic3r/GUI/GLCanvas3D.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/slic3r/GUI/GLCanvas3D.cpp b/src/slic3r/GUI/GLCanvas3D.cpp
index f78307725..71517880a 100644
--- a/src/slic3r/GUI/GLCanvas3D.cpp
+++ b/src/slic3r/GUI/GLCanvas3D.cpp
@@ -1331,7 +1331,7 @@ void GLCanvas3D::toggle_model_objects_visibility(bool visible, const ModelObject
{
for (GLVolume* vol : m_volumes.volumes) {
if (vol->composite_id.object_id == 1000) { // wipe tower
- vol->is_active = (visible && mo == nullptr);
+ vol->is_active = (visible && mo == nullptr);
}
else {
if ((mo == nullptr || m_model->objects[vol->composite_id.object_id] == mo)
@@ -4151,9 +4151,13 @@ void GLCanvas3D::_render_thumbnail_internal(ThumbnailData& thumbnail_data, bool
shader->start_using();
shader->set_uniform("print_box.volume_detection", 0);
- for (const GLVolume* vol : visible_volumes) {
+ for (GLVolume* vol : visible_volumes) {
shader->set_uniform("uniform_color", (vol->printable && !vol->is_outside) ? orange : gray);
+ // the volume may have been deactivated by an active gizmo
+ bool is_active = vol->is_active;
+ vol->is_active = true;
vol->render();
+ vol->is_active = is_active;
}
shader->stop_using();