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
+5
View File
@@ -6308,9 +6308,14 @@ LayerResult GCode::process_layer(
all_label_ids.insert(inst.label_object_id); all_label_ids.insert(inst.label_object_id);
break; break;
} }
// Orca: A scheduled extruder may have no object instances on this layer.
// 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()); 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); 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
// previous extruder; sync so we don't insert it a second time. // previous extruder; sync so we don't insert it a second time.