From afb90b4b2eb7efe45dc0525294cac8485a1762d4 Mon Sep 17 00:00:00 2001 From: digitalfrost Date: Wed, 24 Aug 2022 19:52:26 +0200 Subject: [PATCH] Move initialization of found_solution_for_all Initialize the variable found_solution_for_all with False and don't set it a the exception block. --- cura/Arranging/ArrangeObjectsJob.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cura/Arranging/ArrangeObjectsJob.py b/cura/Arranging/ArrangeObjectsJob.py index d1370d46e1..6ba6717191 100644 --- a/cura/Arranging/ArrangeObjectsJob.py +++ b/cura/Arranging/ArrangeObjectsJob.py @@ -21,6 +21,7 @@ class ArrangeObjectsJob(Job): self._min_offset = min_offset def run(self): + found_solution_for_all = False status_message = Message(i18n_catalog.i18nc("@info:status", "Finding new location for objects"), lifetime = 0, dismissable = False, @@ -31,7 +32,6 @@ class ArrangeObjectsJob(Job): try: found_solution_for_all = arrange(self._nodes, Application.getInstance().getBuildVolume(), self._fixed_nodes) except: # If the thread crashes, the message should still close - found_solution_for_all = False Logger.logException("e", "Unable to arrange the objects on the buildplate. The arrange algorithm has crashed.") status_message.hide()