Finished updating plater to the new centering logic

This commit is contained in:
Alessandro Ranellucci 2013-12-15 23:50:05 +01:00
parent 4993b12799
commit fcbd62f07c
2 changed files with 47 additions and 43 deletions

View file

@ -235,9 +235,12 @@ sub center_instances_around_point {
-$bb->y_min + $point->[Y] - $size->[Y]/2,
);
foreach my $instance (map @{$_->instances}, @{$self->objects}) {
$instance->offset->[X] += $shift[X];
$instance->offset->[Y] += $shift[Y];
foreach my $object (@{$self->objects}) {
foreach my $instance (@{$object->instances}) {
$instance->offset->[X] += $shift[X];
$instance->offset->[Y] += $shift[Y];
}
$object->update_bounding_box;
}
}