Improve error handling of loading Slic3r profiles.

This commit is contained in:
bubnikv 2017-11-28 10:08:01 +01:00
parent bb2b180ecc
commit 3c0cd3cbc8
4 changed files with 42 additions and 17 deletions

View file

@ -93,9 +93,15 @@ sub OnInit {
$self->{preset_bundle}->set_default_suppressed($self->{app_config}->get('no_defaults') ? 1 : 0);
eval {
$self->{preset_bundle}->load_presets(Slic3r::data_dir);
$self->{preset_bundle}->load_selections($self->{app_config});
$run_wizard = 1 if $self->{preset_bundle}->has_defauls_only;
};
if ($@) {
warn $@ . "\n";
show_error(undef, $@);
}
eval {
$self->{preset_bundle}->load_selections($self->{app_config});
};
$run_wizard = 1 if $self->{preset_bundle}->has_defauls_only;
# application frame
Wx::Image::AddHandler(Wx::PNGHandler->new);