mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 00:37:51 -06:00
WIP: When iterating over PrintObject's regions, use the region count
by PrintObject::region_volumes. This is due to the way Print::apply() works, it does not invalidate an existing PrintObject if a new region is added to the print.
This commit is contained in:
parent
7c934ef951
commit
3eea327ef0
4 changed files with 26 additions and 28 deletions
|
@ -151,7 +151,7 @@ void ToolOrdering::collect_extruders(const PrintObject &object)
|
|||
for (auto layer : object.layers()) {
|
||||
LayerTools &layer_tools = this->tools_for_layer(layer->print_z);
|
||||
// What extruders are required to print this object layer?
|
||||
for (size_t region_id = 0; region_id < object.print()->regions().size(); ++ region_id) {
|
||||
for (size_t region_id = 0; region_id < object.region_volumes.size(); ++ region_id) {
|
||||
const LayerRegion *layerm = (region_id < layer->regions().size()) ? layer->regions()[region_id] : nullptr;
|
||||
if (layerm == nullptr)
|
||||
continue;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue