mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-11 16:57:51 -06:00
Fixed up the convex hull 'shadow' creation and deletion after the merge.
Contributes to CURA-1504
This commit is contained in:
parent
fd42a43270
commit
9641a25f31
3 changed files with 28 additions and 19 deletions
|
@ -1,7 +1,6 @@
|
|||
# Copyright (c) 2015 Ultimaker B.V.
|
||||
# Cura is released under the terms of the AGPLv3 or higher.
|
||||
|
||||
from UM.Application import Application
|
||||
from UM.Scene.SceneNode import SceneNode
|
||||
from UM.Resources import Resources
|
||||
from UM.Math.Color import Color
|
||||
|
@ -31,8 +30,6 @@ class ConvexHullNode(SceneNode):
|
|||
|
||||
# The node this mesh is "watching"
|
||||
self._node = node
|
||||
self._node.transformationChanged.connect(self._onNodePositionChanged)
|
||||
self._node.parentChanged.connect(self._onNodeParentChanged)
|
||||
self._node.decoratorsChanged.connect(self._onNodeDecoratorsChanged)
|
||||
self._onNodeDecoratorsChanged(self._node)
|
||||
|
||||
|
@ -84,17 +81,6 @@ class ConvexHullNode(SceneNode):
|
|||
|
||||
return True
|
||||
|
||||
def _onNodePositionChanged(self, node):
|
||||
if Application.getInstance().getController().isToolOperationActive():
|
||||
if node.callDecoration("getConvexHull"):
|
||||
self.setParent(None) # Garbage collection should delete this node after a while.
|
||||
|
||||
def _onNodeParentChanged(self, node):
|
||||
if node.getParent():
|
||||
self.setParent(self._original_parent)
|
||||
else:
|
||||
self.setParent(None)
|
||||
|
||||
def _onNodeDecoratorsChanged(self, node):
|
||||
self._color = Color(35, 35, 35, 0.5)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue