Skip to content

Commit

Permalink
Fixed dragging in 3D plater having some glitches with multipart objects
Browse files Browse the repository at this point in the history
  • Loading branch information
alranel committed Mar 19, 2016
1 parent f8c8342 commit bdf00cb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/Slic3r/GUI/Plater/3D.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit bdf00cb

Please sign in to comment.