Assembly: Fix JCS not drawing correctly when removing selection.

This commit is contained in:
PaddleStroke
2024-02-26 12:14:06 +01:00
committed by Yorik van Havre
parent 812e34899f
commit eafed89837

View File

@@ -358,7 +358,7 @@ class Joint:
joint.Placement2 = App.Placement()
if isAssembly:
assembly.undoSolve()
self.undoPreSolve()
self.undoPreSolve(joint)
def updateJCSPlacements(self, joint):
if not joint.Detach1:
@@ -615,11 +615,13 @@ class Joint:
return True
return False
def undoPreSolve(self):
def undoPreSolve(self, joint):
if self.partMovedByPresolved:
self.partMovedByPresolved.Placement = self.presolveBackupPlc
self.partMovedByPresolved = None
joint.Placement1 = joint.Placement1 # Make sure plc1 is redrawn
def areJcsSameDir(self, joint):
globalJcsPlc1 = UtilsAssembly.getJcsGlobalPlc(joint.Placement1, joint.Object1, joint.Part1)
globalJcsPlc2 = UtilsAssembly.getJcsGlobalPlc(joint.Placement2, joint.Object2, joint.Part2)