Replaced eval { die } construct with a bool return value indicating
success or failure of an automatic arrangement of parts on the print bed.

Don't know exactly what is happening here, but throwing a "die" inside
a XS function and then catching it inside an eval {} block is suspcious.
This commit is contained in:
bubnikv 2016-11-04 15:03:51 +01:00
parent 3fc57ba8d8
commit 6217622865
7 changed files with 35 additions and 20 deletions

View file

@ -965,9 +965,7 @@ sub arrange {
$self->pause_background_process;
my $bb = Slic3r::Geometry::BoundingBoxf->new_from_points($self->{config}->bed_shape);
eval {
$self->{model}->arrange_objects($self->GetFrame->config->min_object_distance, $bb);
};
my $success = $self->{model}->arrange_objects($self->GetFrame->config->min_object_distance, $bb);
# ignore arrange failures on purpose: user has visual feedback and we don't need to warn him
# when parts don't fit in print bed