Only remove the old convex hull shadow when a tool is really being used.

Contributes to CURA-1504
This commit is contained in:
Simon Edwards 2016-05-24 20:56:41 +02:00
parent a2b5128c05
commit 3915dec426

View file

@ -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,6 +83,7 @@ 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.