Fixes to complete_objects to make t/gcode.t pass

This commit is contained in:
Alessandro Ranellucci 2013-12-24 01:13:02 +01:00
parent c5ead0f2a6
commit 7ddf4f3ddf
5 changed files with 15 additions and 11 deletions

View file

@ -166,7 +166,8 @@ sub duplicate {
# note that this will leave the object count unaltered
foreach my $object (@{$self->objects}) {
foreach my $instance (@{$object->instances}) {
my @instances = @{$object->instances}; # store separately to avoid recursion from add_instance() below
foreach my $instance (@instances) {
foreach my $pos (@positions) {
### $object->add_instance($instance->clone); if we had clone()
$object->add_instance(