From c2fecf7c70bcae9028126787e5b82e390f683966 Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Tue, 21 Mar 2017 20:29:36 +0100 Subject: [PATCH] Minor fix to prevent the Cancel button from showing when there are no objects --- lib/Slic3r/GUI/Plater.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/Slic3r/GUI/Plater.pm b/lib/Slic3r/GUI/Plater.pm index 59fa49659..797e7c01f 100644 --- a/lib/Slic3r/GUI/Plater.pm +++ b/lib/Slic3r/GUI/Plater.pm @@ -1343,9 +1343,13 @@ sub start_background_process { my ($self) = @_; return if !$Slic3r::have_threads; - return if !@{$self->{objects}}; return if $self->{process_thread}; + if (!@{$self->{objects}}) { + $self->on_process_completed; + return; + } + # It looks like declaring a local $SIG{__WARN__} prevents the ugly # "Attempt to free unreferenced scalar" warning... local $SIG{__WARN__} = Slic3r::GUI::warning_catcher($self);