From 3915dec42659d26ed1c6f1aef408ae4fa2564534 Mon Sep 17 00:00:00 2001 From: Simon Edwards Date: Tue, 24 May 2016 20:56:41 +0200 Subject: [PATCH] Only remove the old convex hull shadow when a tool is really being used. Contributes to CURA-1504 --- cura/ConvexHullNode.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cura/ConvexHullNode.py b/cura/ConvexHullNode.py index b5a2df518d..3d00edd288 100644 --- a/cura/ConvexHullNode.py +++ b/cura/ConvexHullNode.py @@ -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():