From e7d609db1285ed7d1fae54f2190cfe5b1e19a56b Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Mon, 21 May 2012 20:23:17 +0200 Subject: [PATCH] Fix previous commit about slicing from smallest to tallest --- lib/Slic3r/Print.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Slic3r/Print.pm b/lib/Slic3r/Print.pm index 91a4dca6a..894676867 100644 --- a/lib/Slic3r/Print.pm +++ b/lib/Slic3r/Print.pm @@ -538,7 +538,7 @@ sub write_gcode { # print objects from the smallest to the tallest to avoid collisions # when moving onto next object starting point - my @obj_idx = sort { $a->layer_count <=> $b->layer_count } 0..$#{$self->objects}; + my @obj_idx = sort { $self->objects->[$a]->layer_count <=> $self->objects->[$b]->layer_count } 0..$#{$self->objects}; my $finished_objects = 0; for my $obj_idx (@obj_idx) {