Browse Source

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.
Lipu Fei 6 years ago
parent
commit
3f1e0cc610
1 changed files with 6 additions and 0 deletions
  1. 6 0
      cura/Scene/ConvexHullDecorator.py

+ 6 - 0
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