More work for background processing

This commit is contained in:
Alessandro Ranellucci 2014-06-13 14:27:55 +02:00
parent d9e7a50a6e
commit a0674714b1
2 changed files with 137 additions and 119 deletions

View file

@ -264,10 +264,9 @@ sub catch_error {
my ($self, $cb, $message_dialog) = @_;
if (my $err = $@) {
$cb->() if $cb;
my @params = ($err, 'Error', wxOK | wxICON_ERROR);
$message_dialog
? $message_dialog->(@params)
: Wx::MessageDialog->new($self, @params)->ShowModal;
? $message_dialog->($err, 'Error', wxOK | wxICON_ERROR)
: Slic3r::GUI::show_error($self, $err);
return 1;
}
return 0;