Draft: small fix for older PathArray objects
Older PathLinkArray objects had a `useLink` attribute which was migrated to `use_link`. A recent commit, 0db11da9cf, 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.
This commit is contained in:
@@ -119,7 +119,7 @@ class PathArray(DraftLink):
|
||||
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
|
||||
@@ -173,9 +173,9 @@ class PathArray(DraftLink):
|
||||
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:
|
||||
|
||||
Reference in New Issue
Block a user