mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-18 20:28:08 -06:00
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;
|
$self->{print}->process;
|
||||||
};
|
};
|
||||||
if ($@) {
|
if ($@) {
|
||||||
Slic3r::debugf "Discarding background process error: $@\n";
|
Slic3r::debugf "Background process error: $@\n";
|
||||||
Wx::PostEvent($self, Wx::PlThreadEvent->new(-1, $PROCESS_COMPLETED_EVENT, $@));
|
Wx::PostEvent($self, Wx::PlThreadEvent->new(-1, $PROCESS_COMPLETED_EVENT, $@));
|
||||||
} else {
|
} else {
|
||||||
Wx::PostEvent($self, Wx::PlThreadEvent->new(-1, $PROCESS_COMPLETED_EVENT, undef));
|
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}->detach if $self->{process_thread};
|
||||||
$self->{process_thread} = undef;
|
$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;
|
return if $error;
|
||||||
$self->{toolpaths2D}->reload_print if $self->{toolpaths2D};
|
$self->{toolpaths2D}->reload_print if $self->{toolpaths2D};
|
||||||
$self->{preview3D}->reload_print if $self->{preview3D};
|
$self->{preview3D}->reload_print if $self->{preview3D};
|
||||||
|
|
|
@ -319,7 +319,7 @@ sub slice {
|
||||||
$self->_simplify_slices(scale($self->print->config->resolution));
|
$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};
|
if !@{$self->layers};
|
||||||
|
|
||||||
$self->set_typed_slices(0);
|
$self->set_typed_slices(0);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue