mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-18 11:02:08 +00:00
When background processing fails because of an error, display it in an explicit dialog
This commit is contained in:
@@ -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};
|
||||
|
||||
Reference in New Issue
Block a user