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`.
This commit is contained in:
yw4z authored and GitHub committed 2026-12-02 08:08:28 -06:00
1 parent e9f96a9245
commit f8c333c670
1 file changed
+5
+5
View File
@@ -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();