Draft: small fix for older PathArray objects

Older PathLinkArray objects had a `useLink` attribute
which was migrated to `use_link`. A recent commit, ff323ebdb5,
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:
vocx-fc
2020-05-26 21:36:01 -05:00
committed by Yorik van Havre
parent 9346dfa4f2
commit 547b9e4e20

View File

@@ -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: