From 72a6848f1b411f3399b328337598ce075fb4632c Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Mon, 24 Mar 2014 21:42:38 +0100 Subject: [PATCH] Fixed regression causing wrong relative positions of objects after splitting in plater. #1758 --- lib/Slic3r/GUI/Plater.pm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/Slic3r/GUI/Plater.pm b/lib/Slic3r/GUI/Plater.pm index fc4db7462..5368b3aee 100644 --- a/lib/Slic3r/GUI/Plater.pm +++ b/lib/Slic3r/GUI/Plater.pm @@ -633,6 +633,7 @@ sub split_object { # create a bogus Model object, we only need to instantiate the new Model::Object objects my $new_model = Slic3r::Model->new; + my @model_objects = (); foreach my $mesh (@new_meshes) { $mesh->repair; @@ -659,8 +660,12 @@ sub split_object { } # we need to center this single object around origin $model_object->center_around_origin; - $self->load_model_objects($model_object); + push @model_objects, $model_object; } + + # load all model objects at once, otherwise the plate would be rearranged after each one + # causing original positions not to be kept + $self->load_model_objects(@model_objects); } sub export_gcode {