Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlessandro Ranellucci <aar@cpan.org>2011-11-13 21:14:02 +0400
committerAlessandro Ranellucci <aar@cpan.org>2011-11-13 21:14:02 +0400
commit038caddcdae26a44bb0b68c952570319cd0ab42c (patch)
tree8cac8bb3336223d24bb931b376f0e1b1f5b52010 /lib/Slic3r/GUI
parent041e9877a3838e8441618901dc20e89311de428c (diff)
New fill types (hilbertcurve, archimedeanchords, octagramspiral) and ability to use different patterns for solid layers. #20
Diffstat (limited to 'lib/Slic3r/GUI')
-rw-r--r--lib/Slic3r/GUI/OptionsGroup.pm10
-rw-r--r--lib/Slic3r/GUI/SkeinPanel.pm2
2 files changed, 10 insertions, 2 deletions
diff --git a/lib/Slic3r/GUI/OptionsGroup.pm b/lib/Slic3r/GUI/OptionsGroup.pm
index b5ad7797d..98fa53ed9 100644
--- a/lib/Slic3r/GUI/OptionsGroup.pm
+++ b/lib/Slic3r/GUI/OptionsGroup.pm
@@ -3,7 +3,7 @@ use strict;
use warnings;
use Wx qw(:sizer);
-use Wx::Event qw(EVT_TEXT EVT_CHECKBOX);
+use Wx::Event qw(EVT_TEXT EVT_CHECKBOX EVT_CHOICE);
use base 'Wx::StaticBoxSizer';
# not very elegant, but this solution is temporary waiting for a better GUI
@@ -55,6 +55,14 @@ sub new {
$x_field->SetValue($value->[0]);
$y_field->SetValue($value->[1]);
};
+ } elsif ($opt->{type} eq 'select') {
+ $field = Wx::Choice->new($parent, -1, Wx::wxDefaultPosition, Wx::wxDefaultSize, $opt->{values});
+ EVT_CHOICE($parent, $field, sub { Slic3r::Config->set($opt_key, $opt->{values}[$field->GetSelection]) });
+ push @reload_callbacks, sub {
+ my $value = Slic3r::Config->get($opt_key);
+ $field->SetSelection(grep $opt->{values}[$_] eq $value, 0..$#{$opt->{values}});
+ };
+ $reload_callbacks[-1]->();
} else {
die "Unsupported option type: " . $opt->{type};
}
diff --git a/lib/Slic3r/GUI/SkeinPanel.pm b/lib/Slic3r/GUI/SkeinPanel.pm
index ab338498d..878495da3 100644
--- a/lib/Slic3r/GUI/SkeinPanel.pm
+++ b/lib/Slic3r/GUI/SkeinPanel.pm
@@ -33,7 +33,7 @@ sub new {
),
print => Slic3r::GUI::OptionsGroup->new($self,
title => 'Print settings',
- options => [qw(perimeter_offsets solid_layers fill_density fill_angle)],
+ options => [qw(perimeter_offsets solid_layers fill_density fill_angle fill_pattern solid_fill_pattern)],
),
retract => Slic3r::GUI::OptionsGroup->new($self,
title => 'Retraction',