Only draw the slices in toolpath preview for the current selected layer

This commit is contained in:
Alessandro Ranellucci 2014-12-25 19:35:51 +01:00
parent 617fbaa9bd
commit 4c3fa999f5

View File

@ -242,8 +242,10 @@ sub Render {
foreach my $layer (@{$self->layers}) {
my $object = $layer->object;
# only draw the slice for the current layer
next unless abs($layer->print_z - $self->z) < epsilon;
# draw slice contour
{
glLineWidth(1);
foreach my $copy (@{ $object->_shifted_copies }) {
glPushMatrix();
@ -275,7 +277,6 @@ sub Render {
glPopMatrix();
}
}
}
my $skirt_drawn = 0;
my $brim_drawn = 0;