Draft: _get_shapes in shape2dview.py did not handle null shapes (#14646)

Null shapes do not have a ShapeType (strange IMO). The function did not take that into account.

Forum topic:
https://forum.freecad.org/viewtopic.php?t=88397
This commit is contained in:
Roy-043
2024-06-13 15:27:47 +02:00
committed by GitHub
parent 78c36a22d9
commit eaa67e1bfe

View File

@@ -198,6 +198,8 @@ class Shape2DView(DraftObject):
def _get_shapes(self, shape, onlysolids=False):
if onlysolids:
return shape.Solids
if shape.isNull():
return []
if shape.ShapeType == "Compound":
return shape.SubShapes
return [shape.copy()]