From cfb6934ecc9f05a030ce363d93d1b7b1f7b52427 Mon Sep 17 00:00:00 2001 From: "Zheng, Lei" Date: Sat, 22 Dec 2018 17:05:09 +0800 Subject: [PATCH] assembly: cancel auto solve on undo/redo --- assembly.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/assembly.py b/assembly.py index 30607b0..8e6e9d7 100644 --- a/assembly.py +++ b/assembly.py @@ -1123,6 +1123,8 @@ class AsmElementLink(AsmBase): self.getInfo(True) return if prop == 'Label': + if obj.Document and getattr(obj.Document,'Transacting',False): + return link = getattr(obj,'LinkedObject',None) if isinstance(link,tuple): linked = link[0].getSubObject(link[1],1) @@ -2824,6 +2826,9 @@ class Assembly(AsmGroup): @classmethod def autoSolve(cls,obj,prop,force=False): + if obj.Document and getattr(obj.Document,'Transacting',False): + cls.cancelAutoSolve() + return if not force and cls._PendingSolve: return if force or cls.canAutoSolve():