Moved setting of color for convex hull to constructor

This should result in less color changes so should make it slightly faster
CURA-3419
This commit is contained in:
Jaime van Kessel 2017-03-16 15:08:06 +01:00
parent 36b5c369cf
commit f736e74f77

View File

@ -24,7 +24,7 @@ class ConvexHullNode(SceneNode):
self._original_parent = parent
# Color of the drawn convex hull
self._color = None
self._color = Color(*Application.getInstance().getTheme().getColor("convex_hull").getRgb())
# The y-coordinate of the convex hull mesh. Must not be 0, to prevent z-fighting.
self._mesh_height = 0.1
@ -73,8 +73,6 @@ class ConvexHullNode(SceneNode):
return True
def _onNodeDecoratorsChanged(self, node):
self._color = Color(*Application.getInstance().getTheme().getColor("convex_hull").getRgb())
convex_hull_head = self._node.callDecoration("getConvexHullHead")
if convex_hull_head:
convex_hull_head_builder = MeshBuilder()