Assembly: Improve Exploded View's radial explosion, and various small fixes.

This commit is contained in:
PaddleStroke
2024-04-25 17:07:54 +02:00
committed by Yorik van Havre
parent 3e049b6420
commit ca8ab83e09
2 changed files with 26 additions and 19 deletions

View File

@@ -413,7 +413,10 @@ class Joint:
return None
def getAssembly(self, joint):
return joint.InList[0]
for obj in joint.InList:
if obj.isDerivedFrom("Assembly::AssemblyObject"):
return obj
return None
def setJointType(self, joint, jointType):
joint.JointType = jointType
@@ -882,7 +885,11 @@ class ViewProviderJoint:
if task:
task.reject()
assembly = vobj.Object.InList[0]
assembly = vobj.Object.Proxy.getAssembly(vobj.Object)
if assembly is None:
return False
if UtilsAssembly.activeAssembly() != assembly:
self.gui_doc.setEdit(assembly)