When background processing fails because of an error, display it in an explicit dialog
This commit is contained in:
parent
a25757a66d
commit
198dc7d3bd
2 changed files with 8 additions and 2 deletions
|
@ -999,7 +999,7 @@ sub start_background_process {
|
|||
$self->{print}->process;
|
||||
};
|
||||
if ($@) {
|
||||
Slic3r::debugf "Discarding background process error: $@\n";
|
||||
Slic3r::debugf "Background process error: $@\n";
|
||||
Wx::PostEvent($self, Wx::PlThreadEvent->new(-1, $PROCESS_COMPLETED_EVENT, $@));
|
||||
} else {
|
||||
Wx::PostEvent($self, Wx::PlThreadEvent->new(-1, $PROCESS_COMPLETED_EVENT, undef));
|
||||
|
@ -1150,6 +1150,12 @@ sub on_process_completed {
|
|||
$self->{process_thread}->detach if $self->{process_thread};
|
||||
$self->{process_thread} = undef;
|
||||
|
||||
# if we're supposed to perform an explicit export let's display the error in a dialog
|
||||
if ($error && $self->{export_gcode_output_file}) {
|
||||
$self->{export_gcode_output_file} = undef;
|
||||
Slic3r::GUI::show_error($self, $error);
|
||||
}
|
||||
|
||||
return if $error;
|
||||
$self->{toolpaths2D}->reload_print if $self->{toolpaths2D};
|
||||
$self->{preview3D}->reload_print if $self->{preview3D};
|
||||
|
|
|
@ -319,7 +319,7 @@ sub slice {
|
|||
$self->_simplify_slices(scale($self->print->config->resolution));
|
||||
}
|
||||
|
||||
die "No layers were detected. You might want to repair your STL file(s) or check their size and retry.\n"
|
||||
die "No layers were detected. You might want to repair your STL file(s) or check their size or thickness and retry.\n"
|
||||
if !@{$self->layers};
|
||||
|
||||
$self->set_typed_slices(0);
|
||||
|
|
Loading…
Reference in a new issue