assembly: fix relation selection highlight when using GoToRelation

This commit is contained in:
Zheng, Lei 2021-01-05 14:16:34 +08:00
parent c6f6c481d2
commit 70d161f336

View File

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