From 6aecae3121d33c8e8fa41f131a281794abcf0221 Mon Sep 17 00:00:00 2001 From: Joseph Lenox <lenox.joseph@gmail.com> Date: Mon, 5 Dec 2016 23:08:12 +0000 Subject: [PATCH] UI: fixed naming sphere is not a cylinder. --- lib/Slic3r/GUI/Plater/LambdaObjectDialog.pm | 8 ++++---- lib/Slic3r/GUI/Plater/ObjectPartsPanel.pm | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/Slic3r/GUI/Plater/LambdaObjectDialog.pm b/lib/Slic3r/GUI/Plater/LambdaObjectDialog.pm index 3b96c0db9..cabaebb5b 100644 --- a/lib/Slic3r/GUI/Plater/LambdaObjectDialog.pm +++ b/lib/Slic3r/GUI/Plater/LambdaObjectDialog.pm @@ -23,7 +23,7 @@ sub new { dim => [1, 1, 1], cyl_r => 1, cyl_h => 1, - cyl_rho => 1.0, + sph_rho => 1.0, }; $self->{sizer} = Wx::BoxSizer->new(wxVERTICAL); @@ -118,11 +118,11 @@ sub new { my $optgroup_sphere; $optgroup_sphere = $self->{optgroup_sphere} = Slic3r::GUI::OptionsGroup->new( parent => $self, - title => 'Add Cylinder...', + title => 'Add Sphere...', on_change => sub { # Do validation my ($opt_id) = @_; - if ($opt_id eq 'cyl_rho') { + if ($opt_id eq 'sph_rho') { if (!looks_like_number($optgroup_sphere->get_value($opt_id))) { return 0; } @@ -133,7 +133,7 @@ sub new { ); $optgroup_sphere->append_single_option_line(Slic3r::GUI::OptionsGroup::Option->new( - opt_id => "cyl_rho", + opt_id => "sph_rho", label => 'Rho', type => 'f', default => '1', diff --git a/lib/Slic3r/GUI/Plater/ObjectPartsPanel.pm b/lib/Slic3r/GUI/Plater/ObjectPartsPanel.pm index 3ceb2fc08..5f993eb8f 100644 --- a/lib/Slic3r/GUI/Plater/ObjectPartsPanel.pm +++ b/lib/Slic3r/GUI/Plater/ObjectPartsPanel.pm @@ -351,7 +351,7 @@ sub on_btn_lambda { } elsif ($type eq "cylinder") { $mesh = Slic3r::TriangleMesh::cylinder($params->{"cyl_r"}, $params->{"cyl_h"}); } elsif ($type eq "sphere") { - $mesh = Slic3r::TriangleMesh::sphere($params->{"cyl_rho"}); + $mesh = Slic3r::TriangleMesh::sphere($params->{"sph_rho"}); } else { return; }