Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Slic3r/ExPolygon.pm')
-rw-r--r--lib/Slic3r/ExPolygon.pm7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/Slic3r/ExPolygon.pm b/lib/Slic3r/ExPolygon.pm
index fd1af58b0..c58af979f 100644
--- a/lib/Slic3r/ExPolygon.pm
+++ b/lib/Slic3r/ExPolygon.pm
@@ -32,6 +32,11 @@ sub clone {
Storable::dclone($_[0])
}
+sub threadsafe_clone {
+ my $self = shift;
+ return (ref $self)->new(map $_->threadsafe_clone, @$self);
+}
+
sub contour {
my $self = shift;
return $self->[0];
@@ -303,7 +308,7 @@ has 'expolygons' => (is => 'ro', default => sub { [] });
sub clone {
my $self = shift;
return (ref $self)->new(
- expolygons => [ map $_->clone, @{$self->expolygons} ],
+ expolygons => [ map $_->threadsafe_clone, @{$self->expolygons} ],
);
}