assembly: cancel auto solve on undo/redo

This commit is contained in:
Zheng, Lei 2018-12-22 17:05:09 +08:00
parent eeda4c8512
commit cfb6934ecc

View File

@ -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():