From 9398a1f6c2d2a7da7209f37d0f9d6651f8c4a72b Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Fri, 4 May 2012 10:17:36 +0200 Subject: [PATCH] Splitting unsplittable objects now results in a no-op --- lib/Slic3r/GUI/Plater.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/Slic3r/GUI/Plater.pm b/lib/Slic3r/GUI/Plater.pm index 23a29b6f2..e4fbef7e4 100644 --- a/lib/Slic3r/GUI/Plater.pm +++ b/lib/Slic3r/GUI/Plater.pm @@ -312,7 +312,9 @@ sub split_object { my $mesh = $current_object->mesh->clone; $mesh->scale($Slic3r::scaling_factor); - foreach my $mesh ($mesh->split_mesh) { + my @new_meshes = $mesh->split_mesh; + return if @new_meshes == 1; + foreach my $mesh (@new_meshes) { my $object = $self->{print}->add_object_from_mesh($mesh); $object->input_file($current_object->input_file); $self->object_loaded($#{$self->{print}->objects}, no_arrange => 1);