Fix SLAPrint default overrides

This commit is contained in:
Alessandro Ranellucci 2017-04-18 19:25:18 +02:00
parent 3776f1afc6
commit cf984e17a3
2 changed files with 4 additions and 12 deletions

View File

@ -12,6 +12,10 @@ sub new {
$self->config(Slic3r::Config::SLAPrint->new); $self->config(Slic3r::Config::SLAPrint->new);
$self->config->apply_dynamic(wxTheApp->{mainframe}->{plater}->config); $self->config->apply_dynamic(wxTheApp->{mainframe}->{plater}->config);
# Set some defaults
$self->config->set('infill_extrusion_width', 0.5) if $self->config->infill_extrusion_width == 0;
$self->config->set('perimeter_extrusion_width', 1) if $self->config->perimeter_extrusion_width == 0;
my $sizer = Wx::BoxSizer->new(wxVERTICAL); my $sizer = Wx::BoxSizer->new(wxVERTICAL);
my $new_optgroup = sub { my $new_optgroup = sub {
my ($title) = @_; my ($title) = @_;

View File

@ -574,18 +574,6 @@ class SLAPrintConfig
ConfigOptionFloat support_material_spacing; ConfigOptionFloat support_material_spacing;
ConfigOptionInt threads; ConfigOptionInt threads;
SLAPrintConfig() : StaticPrintConfig() {
this->set_defaults();
// override some defaults
this->fill_density.value = 100;
this->fill_pattern.value = ipGrid;
this->infill_extrusion_width.value = 0.5;
this->infill_extrusion_width.percent = false;
this->perimeter_extrusion_width.value = 1;
this->perimeter_extrusion_width.percent = false;
};
virtual ConfigOption* optptr(const t_config_option_key &opt_key, bool create = false) { virtual ConfigOption* optptr(const t_config_option_key &opt_key, bool create = false) {
OPT_PTR(fill_angle); OPT_PTR(fill_angle);
OPT_PTR(fill_density); OPT_PTR(fill_density);