[Draft] some arrays did not have a Count property (#8433)

This commit is contained in:
Roy-043
2023-02-11 17:09:02 +01:00
committed by GitHub
parent c437b79ada
commit 5d6b447149
2 changed files with 32 additions and 16 deletions

View File

@@ -186,12 +186,14 @@ class DraftLink(DraftObject):
def buildShape(self, obj, pl, pls):
"""Build the shape of the link object."""
if obj.Count != len(pls):
obj.Count = len(pls)
if self.use_link:
if not getattr(obj, 'ExpandArray', False) or obj.Count != len(pls):
if not getattr(obj, 'ExpandArray', False):
obj.setPropertyStatus('PlacementList', '-Immutable')
obj.PlacementList = pls
obj.setPropertyStatus('PlacementList', 'Immutable')
obj.Count = len(pls)
if getattr(obj, 'ExpandArray', False) \
and getattr(obj, 'AlwaysSyncPlacement', False):
for pla,child in zip(pls,obj.ElementList):