From 70d161f336ec08e2447bab0a0cc84429bcd8bc39 Mon Sep 17 00:00:00 2001 From: "Zheng, Lei" Date: Tue, 5 Jan 2021 14:16:34 +0800 Subject: [PATCH] assembly: fix relation selection highlight when using GoToRelation --- freecad/asm3/assembly.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/freecad/asm3/assembly.py b/freecad/asm3/assembly.py index 16058f2..97d01cc 100644 --- a/freecad/asm3/assembly.py +++ b/freecad/asm3/assembly.py @@ -3535,6 +3535,20 @@ class ViewProviderAsmRelation(ViewProviderAsmBase): def claimChildren(self): return self.ViewObject.Object.Group + def getDetailPath(self,subname,path,append): + vobj = self.ViewObject + idx = subname.find('.') + if idx > 0: + obj = vobj.Object + sobj = obj.getSubObject(subname[:idx+1], retType=1) + # checking of relation of part that is a link array element + if sobj != obj: + if isTypeOf(sobj, AsmRelation): + subname = str(sobj.Index) + subname[idx:] + else: + subname = '' + return vobj.getDetailPath(subname,path,append) + BuildShapeNone = 'None' BuildShapeCompound = 'Compound'