From 076d82d8d659c516cdc66eacd0db52d9836287eb Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Sun, 30 Nov 2014 20:53:53 +0100 Subject: [PATCH] Fixed regression causing the plater Split command not to remove objects from the model. #2380 --- lib/Slic3r/GUI/Plater.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/Slic3r/GUI/Plater.pm b/lib/Slic3r/GUI/Plater.pm index c3f5d483e2..2111dc7d95 100644 --- a/lib/Slic3r/GUI/Plater.pm +++ b/lib/Slic3r/GUI/Plater.pm @@ -767,7 +767,10 @@ sub split_object { my $self = shift; my ($obj_idx, $current_object) = $self->selected_object; - my $current_model_object = $self->{model}->objects->[$obj_idx]; + + # we clone model object because split_object() adds the split volumes + # into the same model object, thus causing duplicated when we call load_model_objects() + my $current_model_object = $self->{model}->clone->objects->[$obj_idx]; if (@{$current_model_object->volumes} > 1) { Slic3r::GUI::warning_catcher($self)->("The selected object can't be split because it contains more than one volume/material.");