Launch even if config is corrupted. #1067
This commit is contained in:
parent
f5e48a306d
commit
7b7c9f6330
1 changed files with 13 additions and 8 deletions
|
@ -197,16 +197,21 @@ sub on_select_preset {
|
|||
$self->{config}->set($opt_key, $preset_config->get($opt_key))
|
||||
if $preset_config->has($opt_key);
|
||||
}
|
||||
($preset->{default} || $preset->{external})
|
||||
? $self->{btn_delete_preset}->Disable
|
||||
: $self->{btn_delete_preset}->Enable;
|
||||
|
||||
$self->on_preset_loaded;
|
||||
$self->reload_values;
|
||||
$self->set_dirty(0);
|
||||
$Slic3r::GUI::Settings->{presets}{$self->name} = $preset->{file} ? basename($preset->{file}) : '';
|
||||
};
|
||||
Slic3r::GUI::catch_error($self);
|
||||
($preset->{default} || $preset->{external})
|
||||
? $self->{btn_delete_preset}->Disable
|
||||
: $self->{btn_delete_preset}->Enable;
|
||||
if ($@) {
|
||||
$@ = "I was unable to load the selected config file: $@";
|
||||
Slic3r::GUI::catch_error($self);
|
||||
$self->select_default_preset;
|
||||
}
|
||||
|
||||
$self->on_preset_loaded;
|
||||
$self->reload_values;
|
||||
$self->set_dirty(0);
|
||||
$Slic3r::GUI::Settings->{presets}{$self->name} = $preset->{file} ? basename($preset->{file}) : '';
|
||||
Slic3r::GUI->save_settings;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue