mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-12 09:17:52 -06:00
Bugfix: wrong handling of large number of raft layers. #2041
This commit is contained in:
parent
a62457d6b5
commit
4e5f7d74ff
2 changed files with 7 additions and 8 deletions
|
@ -308,11 +308,10 @@ sub slice {
|
|||
}
|
||||
|
||||
# remove empty layers from bottom
|
||||
my $first_object_layer_id = $self->config->raft_layers;
|
||||
while (@{$self->layers} && !@{$self->layers->[$first_object_layer_id]->slices}) {
|
||||
splice @{$self->layers}, $first_object_layer_id, 1;
|
||||
for (my $i = $first_object_layer_id; $i <= $#{$self->layers}; $i++) {
|
||||
$self->layers->[$i]->id($i);
|
||||
while (@{$self->layers} && !@{$self->layers->[0]->slices}) {
|
||||
shift @{$self->layers};
|
||||
for (my $i = 0; $i <= $#{$self->layers}; $i++) {
|
||||
$self->layers->[$i]->id( $self->layers->[$i]->id-1 );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue