Avoid calling new.unlock() in __deepcopy__()
since the new object's properties aren't necessarily deepcopied yet...
This commit is contained in:
parent
48b28351ed
commit
eb9682b1b8
3 changed files with 6 additions and 3 deletions
|
|
@ -71,7 +71,8 @@ class Label(PositionableImpl, LayerableImpl, LockableImpl, RepeatableImpl, Annot
|
|||
|
||||
def __deepcopy__(self: L, memo: Dict = None) -> L:
|
||||
memo = {} if memo is None else memo
|
||||
new = copy.copy(self).unlock()
|
||||
new = copy.copy(self)
|
||||
LockableImpl.unlock(new)
|
||||
new._offset = self._offset.copy()
|
||||
new.set_locked(self.locked)
|
||||
return new
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue