From f8c333c670062774e6f1cd3e90bca2238877e65c Mon Sep 17 00:00:00 2001 From: yw4z Date: Wed, 2 Dec 2026 17:08:28 +0300 Subject: [PATCH] Fix: Painted object thumbnails uses bright colors if object sliced while selected and thumbnails not updating on remapping colors on AMS (#18037) Since #15776, `GLVolume::simple_render()` brightens the painted colors of a selected volume. `render_thumbnail_internal()` draws through the same function, so the plate, G-code and 3MF thumbnails of a painted object that was selected at slice time were brightened, and the AMS color remap in the send and Sync AMS dialogs started from those brightened images. The thumbnail renderer now clears `selected` around the call and restores it afterward, as it already does for `is_active`. --- src/slic3r/GUI/GLCanvas3D.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/slic3r/GUI/GLCanvas3D.cpp b/src/slic3r/GUI/GLCanvas3D.cpp index ec49f0579d..d58e5ed0d9 100644 --- a/src/slic3r/GUI/GLCanvas3D.cpp +++ b/src/slic3r/GUI/GLCanvas3D.cpp @@ -8048,7 +8048,12 @@ void GLCanvas3D::render_thumbnail_internal(ThumbnailData& thumbnail_data, const shader->set_uniform("projection_matrix", projection_matrix); const Matrix3d view_normal_matrix = view_matrix.matrix().block(0, 0, 3, 3) * model_matrix.matrix().block(0, 0, 3, 3).inverse().transpose(); shader->set_uniform("view_normal_matrix", view_normal_matrix); + // ORCA simple_render() brightens the painted colors of a selected volume + // A thumbnail shows the filament colors, so the selection highlight must stay out of it + const bool is_selected = vol->selected; + vol->selected = false; vol->simple_render(shader, model_objects, extruder_colors, ban_light); + vol->selected = is_selected; vol->is_active = is_active; } shader->stop_using();