From 8fb3a73c3a460f2db87a8fc703223213a12f17e2 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Mon, 8 Apr 2019 09:40:38 +0200 Subject: [PATCH] Use boundingBoxChanged signal to recompute convex hull The boundingbox is the signal we should be listening for, since it does the same as the previous ones (and more!). This also fixes the issue that group nodes didn't get their convex hull set correctly on first creation CURA-6416 --- cura/Scene/ConvexHullDecorator.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/cura/Scene/ConvexHullDecorator.py b/cura/Scene/ConvexHullDecorator.py index da71f6920e..1aae97942a 100644 --- a/cura/Scene/ConvexHullDecorator.py +++ b/cura/Scene/ConvexHullDecorator.py @@ -60,13 +60,11 @@ class ConvexHullDecorator(SceneNodeDecorator): previous_node = self._node # Disconnect from previous node signals if previous_node is not None and node is not previous_node: - previous_node.transformationChanged.disconnect(self._onChanged) - previous_node.parentChanged.disconnect(self._onChanged) + previous_node.boundingBoxChanged.disconnect(self._onChanged) super().setNode(node) - # Mypy doesn't understand that self._node is no longer optional, so just use the node. - node.transformationChanged.connect(self._onChanged) - node.parentChanged.connect(self._onChanged) + + node.boundingBoxChanged.connect(self._onChanged) self._onChanged()