Draft: Small fix in Shape2Dview object

This commit is contained in:
Yorik van Havre 2013-10-28 13:22:57 -02:00
parent 80bbd3f2af
commit 5d9259a36f

View File

@ -294,6 +294,8 @@ def getGroupContents(objectslist,walls=False):
'''getGroupContents(objectlist): if any object of the given list
is a group, its content is appened to the list, which is returned'''
newlist = []
if not isinstance(objectslist,list):
objectslist = [objectslist]
for obj in objectslist:
if obj.isDerivedFrom("App::DocumentObjectGroup"):
if obj.isDerivedFrom("Drawing::FeaturePage"):
@ -3694,7 +3696,8 @@ class _Shape2DView(_DraftObject):
elif obj.Base.isDerivedFrom("App::DocumentObjectGroup"):
shapes = []
for o in obj.Base.Group:
objs = getGroupContents(obj.Base)
for o in objs:
if o.isDerivedFrom("Part::Feature"):
if o.Shape:
if not o.Shape.isNull():