[Label] don't drop annotations when copying
This commit is contained in:
parent
add0600bac
commit
54f3b273bc
1 changed files with 2 additions and 0 deletions
|
|
@ -58,12 +58,14 @@ class Label(PositionableImpl, RepeatableImpl, AnnotatableImpl, Bounded, Pivotabl
|
|||
string=self.string,
|
||||
offset=self.offset.copy(),
|
||||
repetition=self.repetition,
|
||||
annotations=copy.copy(self.annotations),
|
||||
)
|
||||
|
||||
def __deepcopy__(self, memo: dict | None = None) -> Self:
|
||||
memo = {} if memo is None else memo
|
||||
new = copy.copy(self)
|
||||
new._offset = self._offset.copy()
|
||||
new._annotations = copy.deepcopy(self._annotations, memo)
|
||||
return new
|
||||
|
||||
def __lt__(self, other: 'Label') -> bool:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue