fix locking issue in __deepcopy__
This commit is contained in:
parent
e0db621595
commit
f2e6548d21
@ -102,8 +102,9 @@ class Label:
|
|||||||
|
|
||||||
def __deepcopy__(self, memo: Dict = None) -> 'Label':
|
def __deepcopy__(self, memo: Dict = None) -> 'Label':
|
||||||
memo = {} if memo is None else memo
|
memo = {} if memo is None else memo
|
||||||
new = copy.copy(self)
|
new = copy.copy(self).unlock()
|
||||||
new._offset = self._offset.copy()
|
new._offset = self._offset.copy()
|
||||||
|
new.locked = self.locked
|
||||||
return new
|
return new
|
||||||
|
|
||||||
def copy(self) -> 'Label':
|
def copy(self) -> 'Label':
|
||||||
|
@ -127,8 +127,9 @@ class GridRepetition:
|
|||||||
|
|
||||||
def __deepcopy__(self, memo: Dict = None) -> 'GridReptition':
|
def __deepcopy__(self, memo: Dict = None) -> 'GridReptition':
|
||||||
memo = {} if memo is None else memo
|
memo = {} if memo is None else memo
|
||||||
new = copy.copy(self)
|
new = copy.copy(self).unlock()
|
||||||
new.pattern = copy.deepcopy(self.pattern, memo)
|
new.pattern = copy.deepcopy(self.pattern, memo)
|
||||||
|
new.locked = self.locked
|
||||||
return new
|
return new
|
||||||
|
|
||||||
# offset property
|
# offset property
|
||||||
|
@ -70,8 +70,9 @@ class SubPattern:
|
|||||||
|
|
||||||
def __deepcopy__(self, memo: Dict = None) -> 'SubPattern':
|
def __deepcopy__(self, memo: Dict = None) -> 'SubPattern':
|
||||||
memo = {} if memo is None else memo
|
memo = {} if memo is None else memo
|
||||||
new = copy.copy(self)
|
new = copy.copy(self).unlock()
|
||||||
new.pattern = copy.deepcopy(self.pattern, memo)
|
new.pattern = copy.deepcopy(self.pattern, memo)
|
||||||
|
new.locked = self.locked
|
||||||
return new
|
return new
|
||||||
|
|
||||||
# offset property
|
# offset property
|
||||||
|
Loading…
Reference in New Issue
Block a user