Browse Source

Moved setting of color for convex hull to constructor

This should result in less color changes so should make it slightly faster
CURA-3419
Jaime van Kessel 8 years ago
parent
commit
f736e74f77
1 changed files with 1 additions and 3 deletions
  1. 1 3
      cura/ConvexHullNode.py

+ 1 - 3
cura/ConvexHullNode.py

@@ -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()