From 27a1a6609fb2b745f5397f66a690691f88ca118d Mon Sep 17 00:00:00 2001 From: Joseph Lenox Date: Tue, 7 Feb 2017 16:46:54 -0600 Subject: [PATCH] Fixed input to bed shape dialog to catch everything that resolves to 0. Fixes #3681 (#3683) --- lib/Slic3r/GUI/BedShapeDialog.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Slic3r/GUI/BedShapeDialog.pm b/lib/Slic3r/GUI/BedShapeDialog.pm index 9da717ab8..1ef787e70 100644 --- a/lib/Slic3r/GUI/BedShapeDialog.pm +++ b/lib/Slic3r/GUI/BedShapeDialog.pm @@ -212,9 +212,9 @@ sub _update_shape { my $rect_origin = $self->{optgroups}[SHAPE_RECTANGULAR]->get_value('rect_origin'); my ($x, $y) = @$rect_size; return if !looks_like_number($x) || !looks_like_number($y); # empty strings or '-' or other things - return if !$x || !$y; + return if !$x || !$y or $x == 0 or $y == 0; my ($x0, $y0) = (0,0); - my ($x1, $y1) = ($x,$y); + my ($x1, $y1) = ($x ,$y); { my ($dx, $dy) = @$rect_origin; return if !looks_like_number($dx) || !looks_like_number($dy); # empty strings or '-' or other things @@ -231,7 +231,7 @@ sub _update_shape { ]); } elsif ($page_idx == SHAPE_CIRCULAR) { my $diameter = $self->{optgroups}[SHAPE_CIRCULAR]->get_value('diameter'); - return if !$diameter; + return if !$diameter or $diameter == 0; my $r = $diameter/2; my $twopi = 2*PI; my $edges = 60;