From b961711f28c90886b32ce88a2130113dac41f455 Mon Sep 17 00:00:00 2001 From: Enrico Turri Date: Tue, 10 Apr 2018 13:39:10 +0200 Subject: [PATCH] Fixed autoscale of objects after loading --- lib/Slic3r/GUI/Plater.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Slic3r/GUI/Plater.pm b/lib/Slic3r/GUI/Plater.pm index ecac430a44..c74b2d32c3 100644 --- a/lib/Slic3r/GUI/Plater.pm +++ b/lib/Slic3r/GUI/Plater.pm @@ -737,7 +737,7 @@ sub load_model_objects { { # if the object is too large (more than 5 times the bed), scale it down my $size = $o->bounding_box->size; - my $ratio = max(@$size[X,Y]) / unscale(max(@$bed_size[X,Y])); + my $ratio = max($size->x / unscale($bed_size->x), $size->y / unscale($bed_size->y)); if ($ratio > 5) { $_->set_scaling_factor(1/$ratio) for @{$o->instances}; $scaled_down = 1;