mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-23 06:33:57 -06:00
Further reduction of Perl Config.pm methods.
This commit is contained in:
parent
3bc79e80d5
commit
2455aee97c
28 changed files with 118 additions and 136 deletions
|
@ -312,7 +312,7 @@ sub selection_changed {
|
|||
$config = $self->{model_object}->config;
|
||||
}
|
||||
# get default values
|
||||
my $default_config = Slic3r::Config->new_from_defaults(@opt_keys);
|
||||
my $default_config = Slic3r::Config::new_from_defaults_keys(@opt_keys);
|
||||
|
||||
# append default extruder
|
||||
push @opt_keys, 'extruder';
|
||||
|
@ -490,12 +490,12 @@ sub CanClose {
|
|||
# validate options before allowing user to dismiss the dialog
|
||||
# the validate method only works on full configs so we have
|
||||
# to merge our settings with the default ones
|
||||
my $config = Slic3r::Config->merge($self->GetParent->GetParent->GetParent->GetParent->GetParent->config, $self->model_object->config);
|
||||
my $config = $self->GetParent->GetParent->GetParent->GetParent->GetParent->config->clone;
|
||||
eval {
|
||||
$config->apply($self->model_object->config);
|
||||
$config->validate;
|
||||
};
|
||||
return 0 if Slic3r::GUI::catch_error($self);
|
||||
return 1;
|
||||
return ! Slic3r::GUI::catch_error($self);
|
||||
}
|
||||
|
||||
sub PartsChanged {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue