Fix Intra-layer "As Object List" not working. (#12368)

Added checks in ByLayer print sequence to handle ordering for Intra-layer ordering option. Prevents new ordering setup when "As object list" is enabled.
This commit is contained in:
Derrick 2026-02-23 22:05:47 +08:00 committed by GitHub
parent e7d2bbd6a9
commit b89f67e433
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -4882,7 +4882,10 @@ LayerResult GCode::process_layer(
if (print.config().print_sequence == PrintSequence::ByObject) {
filament_to_print_instances[filament_id] = sort_print_object_instances(objects_by_extruder_it->second, layers, ordering, single_object_instance_idx);
} else {
filament_to_print_instances[filament_id] = sort_print_object_instances(objects_by_extruder_it->second, layers, &new_ordering, single_object_instance_idx);
// PrintSequence::ByLayer to use global ordering ( per object ordering ) if intra-layer order PrintOrder::AsObjectList is specified while keeping behaviour of PrintSequence::ByLayer
const std::vector<const PrintInstance*>* ordering_for_filament = (print.config().print_order == PrintOrder::AsObjectList && ordering != nullptr) ? ordering: &new_ordering;
filament_to_print_instances[filament_id] = sort_print_object_instances(objects_by_extruder_it->second, layers, ordering_for_filament, single_object_instance_idx);
}
}
}