Fix crash when using multiple skirts with a single, non-zero, extruder. Includes regression test

This commit is contained in:
Alessandro Ranellucci 2014-04-05 10:09:05 +02:00
parent a6dd68a2a6
commit 6f3844c1ba
2 changed files with 14 additions and 2 deletions

View file

@ -90,7 +90,8 @@ sub process_layer {
# when printing layers > 0 ignore 'min_skirt_length' and
# just use the 'skirts' setting; also just use the current extruder
last if ($layer->id > 0) && ($i >= $self->print->config->skirts);
$gcode .= $self->gcodegen->set_extruder(($i/@extruder_ids) % @extruder_ids)
my $extruder_id = $extruder_ids[($i/@extruder_ids) % @extruder_ids];
$gcode .= $self->gcodegen->set_extruder($extruder_id)
if $layer->id == 0;
$gcode .= $self->gcodegen->extrude_loop($skirt_loops[$i], 'skirt');
}