From 547b9e4e20dfd44da150ede604899cb7c5ba7193 Mon Sep 17 00:00:00 2001 From: vocx-fc Date: Tue, 26 May 2020 21:36:01 -0500 Subject: [PATCH] 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. --- src/Mod/Draft/draftobjects/patharray.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Mod/Draft/draftobjects/patharray.py b/src/Mod/Draft/draftobjects/patharray.py index bd115e09e1..a6a9edaf77 100644 --- a/src/Mod/Draft/draftobjects/patharray.py +++ b/src/Mod/Draft/draftobjects/patharray.py @@ -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: