From 412a8626776fd303c49e4b7943afcf1030053509 Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Sat, 19 Mar 2016 22:30:01 +0100 Subject: [PATCH] Fixed dragging in 3D plater having some glitches with multipart objects --- lib/Slic3r/GUI/Plater/3D.pm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/Slic3r/GUI/Plater/3D.pm b/lib/Slic3r/GUI/Plater/3D.pm index 5928625ef..07818a2b5 100644 --- a/lib/Slic3r/GUI/Plater/3D.pm +++ b/lib/Slic3r/GUI/Plater/3D.pm @@ -39,10 +39,14 @@ sub new { $self->on_move(sub { my @volume_idxs = @_; + my %done = (); # prevent moving instances twice foreach my $volume_idx (@volume_idxs) { my $volume = $self->volumes->[$volume_idx]; my $obj_idx = $self->object_idx($volume_idx); my $instance_idx = $self->instance_idx($volume_idx); + next if $done{"${obj_idx}_${instance_idx}"}; + $done{"${obj_idx}_${instance_idx}"} = 1; + my $model_object = $self->{model}->get_object($obj_idx); $model_object ->instances->[$instance_idx]