Merge branch 'main' into belt/baseChanges

This commit is contained in:
Rodrigo Faselli
2026-06-11 11:59:53 -03:00
committed by GitHub
1058 changed files with 145478 additions and 12479 deletions
+6
View File
@@ -2647,8 +2647,14 @@ void GCodeViewer::render_all_plates_stats(const std::vector<const GCodeProcessor
{
auto plate_print_statistics = plate->get_slice_result()->print_statistics;
auto plate_extruders = plate->get_extruders(true);
auto max_extruders_colors = wxGetApp().plater()->get_extruders_colors().size();
for (size_t extruder_id : plate_extruders) {
extruder_id -= 1;
// Skip stale/overflow extruder indices (e.g. from object assignments that outlived a
// filament-count change) so downstream per-extruder lookups stay in range. Ported
// from BambuStudio (STUDIO-15763).
if (extruder_id >= max_extruders_colors)
continue;
if (plate_print_statistics.model_volumes_per_extruder.find(extruder_id) == plate_print_statistics.model_volumes_per_extruder.end())
model_volume_of_extruders_all_plates[extruder_id] += 0;
else {