From 4979029cd285ec30126dbfe84d16ce22465a471a Mon Sep 17 00:00:00 2001 From: Nicolas Dandrimont Date: Sat, 11 Aug 2012 15:49:06 +0200 Subject: [PATCH] Dereference the Wx object id when removing an object in the plater. --- 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 ee7e536905..bbd6f587be 100644 --- a/lib/Slic3r/GUI/Plater.pm +++ b/lib/Slic3r/GUI/Plater.pm @@ -323,8 +323,10 @@ sub object_loaded { sub remove { my $self = shift; - my ($obj_idx) = @_; + my ($obj) = @_; + my $obj_idx = $obj->GetInt(); + if (defined $obj_idx) { $self->{print}->copies->[$obj_idx][$_] = undef for 0 .. $#{ $self->{print}->copies->[$obj_idx] };