mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-15 18:57:52 -06:00
Only remove the old convex hull shadow when a tool is really being used.
Contributes to CURA-1504
This commit is contained in:
parent
a2b5128c05
commit
3915dec426
1 changed files with 4 additions and 3 deletions
|
@ -1,6 +1,7 @@
|
|||
# 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
|
||||
|
@ -8,7 +9,6 @@ from UM.Math.Vector import Vector
|
|||
from UM.Mesh.MeshBuilder import MeshBuilder # To create a mesh to display the convex hull with.
|
||||
|
||||
from UM.View.GL.OpenGL import OpenGL
|
||||
from UM.Logger import spy
|
||||
|
||||
class ConvexHullNode(SceneNode):
|
||||
## Convex hull node is a special type of scene node that is used to display a 2D area, to indicate the
|
||||
|
@ -83,8 +83,9 @@ class ConvexHullNode(SceneNode):
|
|||
return True
|
||||
|
||||
def _onNodePositionChanged(self, node):
|
||||
if node.callDecoration("getConvexHull"):
|
||||
self.setParent(None) # Garbage collection should delete this node after a while.
|
||||
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():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue