From ebc1df1a4cac0d510c263e73ebaba579683be78b Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Mon, 1 Feb 2016 17:03:53 +0100 Subject: [PATCH] Hull node is no longer added if linked node is deleted while it was calculating CURA-637 --- cura/ConvexHullJob.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cura/ConvexHullJob.py b/cura/ConvexHullJob.py index 18810ffed0..0f69afcaec 100644 --- a/cura/ConvexHullJob.py +++ b/cura/ConvexHullJob.py @@ -64,12 +64,17 @@ class ConvexHullJob(Job): hull = hull.getMinkowskiHull(Polygon(numpy.array(profile.getSettingValue("machine_head_polygon"),numpy.float32))) else: self._node.callDecoration("setConvexHullHead", None) + if self._node.getParent() is None: #Node was already deleted before job is done. + self._node.callDecoration("setConvexHullNode",None) + self._node.callDecoration("setConvexHull", None) + self._node.callDecoration("setConvexHullJob", None) + return hull_node = ConvexHullNode.ConvexHullNode(self._node, hull, Application.getInstance().getController().getScene().getRoot()) self._node.callDecoration("setConvexHullNode", hull_node) self._node.callDecoration("setConvexHull", hull) self._node.callDecoration("setConvexHullJob", None) - if self._node.getParent().callDecoration("isGroup"): + if self._node.getParent() and self._node.getParent().callDecoration("isGroup"): job = self._node.getParent().callDecoration("getConvexHullJob") if job: job.cancel()