Fix label object error for toolchanges without object instances (#15666)

This commit is contained in:
Kiss Lorand
2026-09-13 19:42:49 -03:00
committed by GitHub
parent 26fa1694d9
commit aef9ca2efb
+7 -2
View File
@@ -6308,8 +6308,13 @@ LayerResult GCode::process_layer(
all_label_ids.insert(inst.label_object_id); all_label_ids.insert(inst.label_object_id);
break; break;
} }
std::vector<size_t> filament_instances_id(all_label_ids.begin(), all_label_ids.end()); // Orca: A scheduled extruder may have no object instances on this layer.
m_filament_instances_code = _encode_label_ids_to_base64(filament_instances_id); // Clear any pending mask so it cannot be emitted for the wrong toolchange.
m_filament_instances_code.clear();
if (!all_label_ids.empty()) {
std::vector<size_t> filament_instances_id(all_label_ids.begin(), all_label_ids.end());
m_filament_instances_code = _encode_label_ids_to_base64(filament_instances_id);
}
} }
// The inline _extrude hook may already have taken the snapshot mid-extrusion on a // The inline _extrude hook may already have taken the snapshot mid-extrusion on a