From c6d1caaf0f0c64da1d9d2b0abcd92964847f5ba3 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Thu, 28 Jul 2016 11:47:56 +0200 Subject: [PATCH] Convex hull is no longer needlessly re-calculated CURA-2002 --- cura/ConvexHullDecorator.py | 5 +++-- cura/PlatformPhysics.py | 1 - 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cura/ConvexHullDecorator.py b/cura/ConvexHullDecorator.py index d864f4288b..783d74e41b 100644 --- a/cura/ConvexHullDecorator.py +++ b/cura/ConvexHullDecorator.py @@ -30,9 +30,10 @@ class ConvexHullDecorator(SceneNodeDecorator): def setNode(self, node): previous_node = self._node + # Disconnect from previous node signals if previous_node is not None and node is not previous_node: - previous_node.transformationChanged.connect(self._onChanged) - previous_node.parentChanged.connect(self._onChanged) + previous_node.transformationChanged.disconnect(self._onChanged) + previous_node.parentChanged.disconnect(self._onChanged) super().setNode(node) diff --git a/cura/PlatformPhysics.py b/cura/PlatformPhysics.py index 91d2b1a1ef..56daaddc18 100644 --- a/cura/PlatformPhysics.py +++ b/cura/PlatformPhysics.py @@ -71,7 +71,6 @@ class PlatformPhysics: # If there is no convex hull for the node, start calculating it and continue. if not node.getDecorator(ConvexHullDecorator): node.addDecorator(ConvexHullDecorator()) - node.callDecoration("recomputeConvexHull") if Preferences.getInstance().getValue("physics/automatic_push_free"): # Check for collisions between convex hulls