From 3f1e0cc61013b4626c09a7b8995504f6bb0b2c01 Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Mon, 5 Nov 2018 14:25:16 +0100 Subject: [PATCH] Fix delayed convex hull recomputation CURA-5896 If the current tool operation is still active, we need to delay the convex hull recomputation after the tool becomes inactive. --- cura/Scene/ConvexHullDecorator.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cura/Scene/ConvexHullDecorator.py b/cura/Scene/ConvexHullDecorator.py index 52e687832c..39124c5ba3 100644 --- a/cura/Scene/ConvexHullDecorator.py +++ b/cura/Scene/ConvexHullDecorator.py @@ -142,6 +142,12 @@ class ConvexHullDecorator(SceneNodeDecorator): controller = Application.getInstance().getController() root = controller.getScene().getRoot() if self._node is None or controller.isToolOperationActive() or not self.__isDescendant(root, self._node): + # If the tool operation is still active, we need to compute the convex hull later after the controller is + # no longer active. + if controller.isToolOperationActive(): + self.recomputeConvexHullDelayed() + return + if self._convex_hull_node: self._convex_hull_node.setParent(None) self._convex_hull_node = None