diff options
author | Nino van Hooff <ninovanhooff@gmail.com> | 2019-12-06 13:47:07 +0300 |
---|---|---|
committer | Nino van Hooff <ninovanhooff@gmail.com> | 2019-12-06 13:47:07 +0300 |
commit | f4c68f4e7163b5819fffec3f861247bbba8b497b (patch) | |
tree | 40ce077c507a9eba80455f7f513332619e0d38e8 /cura/Scene | |
parent | 2d8a415a69325c862259bca50d0d21e3bc785e0d (diff) |
Fix two mypy warnings
CURA-6522
Diffstat (limited to 'cura/Scene')
-rw-r--r-- | cura/Scene/ConvexHullDecorator.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/cura/Scene/ConvexHullDecorator.py b/cura/Scene/ConvexHullDecorator.py index d1d3510346..d87a0bb351 100644 --- a/cura/Scene/ConvexHullDecorator.py +++ b/cura/Scene/ConvexHullDecorator.py @@ -99,6 +99,8 @@ class ConvexHullDecorator(SceneNodeDecorator): # Parent can be None if node is just loaded. if self._is_singular_one_at_a_time_node(): hull = self.getConvexHullHeadFull() + if hull is None: + return None hull = self._add2DAdhesionMargin(hull) return hull @@ -144,7 +146,7 @@ class ConvexHullDecorator(SceneNodeDecorator): def getConvexHullBoundary(self) -> Optional[Polygon]: if self._node is None: return None - + if self._node.callDecoration("isNonPrintingMesh"): return None @@ -433,9 +435,9 @@ class ConvexHullDecorator(SceneNodeDecorator): def _is_singular_one_at_a_time_node(self) -> bool: if self._node is None: return False - return self._global_stack \ - and self._global_stack.getProperty("print_sequence", "value") == "one_at_a_time" \ - and not self.hasGroupAsParent(self._node) + return self._global_stack is not None \ + and self._global_stack.getProperty("print_sequence", "value") == "one_at_a_time" \ + and not self.hasGroupAsParent(self._node) _affected_settings = [ "adhesion_type", "raft_margin", "print_sequence", |