Bugfix: background processing were not restarted after the previous one failed because of a validation error. #2633
This commit is contained in:
parent
a07c48bb30
commit
09c8563e71
1 changed files with 11 additions and 8 deletions
|
@ -980,9 +980,13 @@ sub pause_background_process {
|
||||||
|
|
||||||
if ($self->{process_thread} || $self->{export_thread}) {
|
if ($self->{process_thread} || $self->{export_thread}) {
|
||||||
Slic3r::pause_all_threads();
|
Slic3r::pause_all_threads();
|
||||||
|
return 1;
|
||||||
} elsif (defined $self->{apply_config_timer} && $self->{apply_config_timer}->IsRunning) {
|
} elsif (defined $self->{apply_config_timer} && $self->{apply_config_timer}->IsRunning) {
|
||||||
$self->{apply_config_timer}->Stop;
|
$self->{apply_config_timer}->Stop;
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub resume_background_process {
|
sub resume_background_process {
|
||||||
|
@ -1281,9 +1285,14 @@ sub update {
|
||||||
$self->{model}->center_instances_around_point($self->bed_centerf);
|
$self->{model}->center_instances_around_point($self->bed_centerf);
|
||||||
}
|
}
|
||||||
|
|
||||||
$self->pause_background_process;
|
my $running = $self->pause_background_process;
|
||||||
my $invalidated = $self->{print}->reload_model_instances();
|
my $invalidated = $self->{print}->reload_model_instances();
|
||||||
if ($invalidated) {
|
|
||||||
|
# The mere fact that no steps were invalidated when reloading model instances
|
||||||
|
# doesn't mean that all steps were done: for example, validation might have
|
||||||
|
# failed upon previous instance move, so we have no running thread and no steps
|
||||||
|
# are invalidated on this move, thus we need to schedule a new run.
|
||||||
|
if ($invalidated || !$running) {
|
||||||
$self->schedule_background_process;
|
$self->schedule_background_process;
|
||||||
} else {
|
} else {
|
||||||
$self->resume_background_process;
|
$self->resume_background_process;
|
||||||
|
@ -1292,12 +1301,6 @@ sub update {
|
||||||
$self->refresh_canvases;
|
$self->refresh_canvases;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub on_model_instances_changed {
|
|
||||||
my ($self) = @_;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
sub on_extruders_change {
|
sub on_extruders_change {
|
||||||
my ($self, $num_extruders) = @_;
|
my ($self, $num_extruders) = @_;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue