From 4cfd25ecaf29268c62fac28e1d584ba5a728aa51 Mon Sep 17 00:00:00 2001 From: "Zheng, Lei" Date: Wed, 5 Sep 2018 20:34:04 +0800 Subject: [PATCH] Draft: fix DraftLinkArray Fixes realthunder/FreeCAD_Assembly3#58 --- src/Mod/Draft/Draft.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Mod/Draft/Draft.py b/src/Mod/Draft/Draft.py index 8c898d86b5af..b8c029291084 100644 --- a/src/Mod/Draft/Draft.py +++ b/src/Mod/Draft/Draft.py @@ -5925,6 +5925,8 @@ def linkSetup(self,obj): obj.ExpandArray = showElement obj.configLinkProperty(ShowElement='ExpandArray') obj.removeProperty('ShowElement') + else: + obj.configLinkProperty(ShowElement='ExpandArray') if getattr(obj,'ExpandArray',False): obj.setPropertyStatus('PlacementList','Immutable') else: @@ -5992,8 +5994,9 @@ def onChanged(self, obj, prop): else: obj.setPropertyStatus('Shape','Transient') elif prop == 'ExpandArray': - obj.setPropertyStatus('PlacementList', - '-Immutable' if obj.ExpandArray else 'Immutable') + if hasattr(obj,'PlacementList'): + obj.setPropertyStatus('PlacementList', + '-Immutable' if obj.ExpandArray else 'Immutable') class _Array(_DraftLink):