From 1f497c0f7c83a0551479c88a2a6a48e5c963e0d2 Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Wed, 11 Jun 2014 18:02:51 +0200 Subject: [PATCH] Make support material generation idempotent --- lib/Slic3r/Print/Object.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Slic3r/Print/Object.pm b/lib/Slic3r/Print/Object.pm index 1e0217c7..55703d72 100644 --- a/lib/Slic3r/Print/Object.pm +++ b/lib/Slic3r/Print/Object.pm @@ -1005,8 +1005,8 @@ sub combine_infill { sub generate_support_material { my $self = shift; - # TODO: make this method idempotent by removing all support layers - # before checking whether we need to generate support or not + $self->clear_support_layers; + return unless ($self->config->support_material || $self->config->raft_layers > 0) && scalar(@{$self->layers}) >= 2;