Fixed dragging in 3D plater having some glitches with multipart objects
This commit is contained in:
parent
dd879c3ef2
commit
412a862677
@ -39,10 +39,14 @@ sub new {
|
|||||||
$self->on_move(sub {
|
$self->on_move(sub {
|
||||||
my @volume_idxs = @_;
|
my @volume_idxs = @_;
|
||||||
|
|
||||||
|
my %done = (); # prevent moving instances twice
|
||||||
foreach my $volume_idx (@volume_idxs) {
|
foreach my $volume_idx (@volume_idxs) {
|
||||||
my $volume = $self->volumes->[$volume_idx];
|
my $volume = $self->volumes->[$volume_idx];
|
||||||
my $obj_idx = $self->object_idx($volume_idx);
|
my $obj_idx = $self->object_idx($volume_idx);
|
||||||
my $instance_idx = $self->instance_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);
|
my $model_object = $self->{model}->get_object($obj_idx);
|
||||||
$model_object
|
$model_object
|
||||||
->instances->[$instance_idx]
|
->instances->[$instance_idx]
|
||||||
|
Loading…
Reference in New Issue
Block a user