Skip to content

Commit

Permalink
Draft: small fix for older PathArray objects
Browse files Browse the repository at this point in the history
Older PathLinkArray objects had a `useLink` attribute
which was migrated to `use_link`. A recent commit, ff323eb,
made some improvements to the PathArray
object, but broke the migration of the property.

This fixes the migration, so that now all objects should
open correctly.
  • Loading branch information
vocx-fc authored and yorikvanhavre committed May 29, 2020
1 parent 9346dfa commit 547b9e4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Mod/Draft/draftobjects/patharray.py
Expand Up @@ -119,7 +119,7 @@ def setProperties(self,obj):
obj.addProperty("App::PropertyVector","VerticalVector","Alignment", _tip)
obj.VerticalVector = App.Vector(0,0,1)

if self.use_link:
if self.use_link and "ExpandArray" not in pl:
_tip = _tr("Show array element as children object")
obj.addProperty("App::PropertyBool","ExpandArray", "Parameters", _tip)
obj.ExpandArray = False
Expand Down Expand Up @@ -173,9 +173,9 @@ def getWireFromSubs(self,obj):
return Part.Wire(sl)

def onDocumentRestored(self, obj):
self.migrate_attributes(obj)
self.setProperties(obj)

self.migrate_attributes(obj)
if self.use_link:
self.linkSetup(obj)
else:
Expand Down

0 comments on commit 547b9e4

Please sign in to comment.