From 84d9368bf68a38e35811c55a97fc5a52072f6cfa Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Mon, 30 Apr 2012 17:55:32 +0200 Subject: [PATCH] Bugfix: error on Honeycomb infill --- lib/Slic3r/Fill/Honeycomb.pm | 2 +- lib/Slic3r/GUI/Dashboard.pm | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Slic3r/Fill/Honeycomb.pm b/lib/Slic3r/Fill/Honeycomb.pm index aa54cb045..0ae87aca8 100644 --- a/lib/Slic3r/Fill/Honeycomb.pm +++ b/lib/Slic3r/Fill/Honeycomb.pm @@ -39,7 +39,7 @@ sub fill_surface { # adjust actual bounding box to the nearest multiple of our hex pattern # and align it so that it matches across layers - my $print_bounding_box = $self->print->bounding_box; + my $print_bounding_box = [ $self->print->bounding_box ]; my $bounding_box = [ 0, 0, $print_bounding_box->[X2], $print_bounding_box->[Y2] ]; { my $bb_polygon = Slic3r::Polygon->new([ diff --git a/lib/Slic3r/GUI/Dashboard.pm b/lib/Slic3r/GUI/Dashboard.pm index a582625b8..6bb3d0116 100644 --- a/lib/Slic3r/GUI/Dashboard.pm +++ b/lib/Slic3r/GUI/Dashboard.pm @@ -434,6 +434,7 @@ sub repaint { $dc->SetPen(Wx::wxBLACK_PEN); @{$parent->{object_previews}} = (); for my $obj_idx (0 .. $#{$print->objects}) { + next unless $parent->{thumbnails}[$obj_idx]; for my $copy_idx (0 .. $#{$print->copies->[$obj_idx]}) { my $copy = $print->copies->[$obj_idx][$copy_idx]; push @{$parent->{object_previews}}, [ $obj_idx, $copy_idx, $parent->{thumbnails}[$obj_idx]->clone ];