From 4c33eabc6e6c609f4a3de682861795b034805619 Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Sun, 29 Jul 2012 17:02:46 +0200 Subject: [PATCH] Slicing from plater was still using the default options --- lib/Slic3r/Print.pm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/Slic3r/Print.pm b/lib/Slic3r/Print.pm index 093f2eb0..b32543b4 100644 --- a/lib/Slic3r/Print.pm +++ b/lib/Slic3r/Print.pm @@ -8,7 +8,7 @@ use Slic3r::Geometry qw(X Y Z X1 Y1 X2 Y2 PI scale unscale move_points); use Slic3r::Geometry::Clipper qw(diff_ex union_ex intersection_ex offset JT_ROUND); use Time::HiRes qw(gettimeofday tv_interval); -has 'config' => (is => 'rw', default => sub { Slic3r::Config->new_from_defaults }); +has 'config' => (is => 'rw', default => sub { Slic3r::Config->new_from_defaults }, trigger => 1); has 'objects' => (is => 'rw', default => sub {[]}); has 'copies' => (is => 'rw', default => sub {[]}); # obj_idx => [copies...] has 'total_extrusion_length' => (is => 'rw'); @@ -31,6 +31,13 @@ has 'brim' => ( sub BUILD { my $self = shift; + # call this manually because the 'default' coderef doesn't trigger the trigger + $self->_trigger_config; +} + +sub _trigger_config { + my $self = shift; + # store config in a handy place $Slic3r::Config = $self->config;