Minor fix to prevent the Cancel button from showing when there are no objects

This commit is contained in:
Alessandro Ranellucci 2017-03-21 20:29:36 +01:00
parent 9e6b869bd4
commit c2fecf7c70

View File

@ -1343,9 +1343,13 @@ sub start_background_process {
my ($self) = @_; my ($self) = @_;
return if !$Slic3r::have_threads; return if !$Slic3r::have_threads;
return if !@{$self->{objects}};
return if $self->{process_thread}; return if $self->{process_thread};
if (!@{$self->{objects}}) {
$self->on_process_completed;
return;
}
# It looks like declaring a local $SIG{__WARN__} prevents the ugly # It looks like declaring a local $SIG{__WARN__} prevents the ugly
# "Attempt to free unreferenced scalar" warning... # "Attempt to free unreferenced scalar" warning...
local $SIG{__WARN__} = Slic3r::GUI::warning_catcher($self); local $SIG{__WARN__} = Slic3r::GUI::warning_catcher($self);