mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-24 23:23:57 -06:00
Reimplement the "no convex hull when using a tool" functionality.
Contributes to CURA-1504
This commit is contained in:
parent
9641a25f31
commit
631ef8e678
1 changed files with 6 additions and 2 deletions
|
@ -17,6 +17,9 @@ class ConvexHullDecorator(SceneNodeDecorator):
|
||||||
|
|
||||||
self._global_stack = None
|
self._global_stack = None
|
||||||
Application.getInstance().globalContainerStackChanged.connect(self._onGlobalStackChanged)
|
Application.getInstance().globalContainerStackChanged.connect(self._onGlobalStackChanged)
|
||||||
|
Application.getInstance().getController().toolOperationStarted.connect(self._onChanged)
|
||||||
|
Application.getInstance().getController().toolOperationStopped.connect(self._onChanged)
|
||||||
|
|
||||||
self._onGlobalStackChanged()
|
self._onGlobalStackChanged()
|
||||||
|
|
||||||
def setNode(self, node):
|
def setNode(self, node):
|
||||||
|
@ -80,8 +83,9 @@ class ConvexHullDecorator(SceneNodeDecorator):
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def recomputeConvexHull(self):
|
def recomputeConvexHull(self):
|
||||||
root = Application.getInstance().getController().getScene().getRoot()
|
controller = Application.getInstance().getController()
|
||||||
if self._node is None or not self.__isDescendant(root, self._node):
|
root = controller.getScene().getRoot()
|
||||||
|
if self._node is None or controller.isToolOperationActive() or not self.__isDescendant(root, self._node):
|
||||||
if self._convex_hull_node:
|
if self._convex_hull_node:
|
||||||
self._convex_hull_node.setParent(None)
|
self._convex_hull_node.setParent(None)
|
||||||
self._convex_hull_node = None
|
self._convex_hull_node = None
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue