Don't trash label identifiers

This commit is contained in:
Jan Petykiewicz 2021-03-08 17:04:59 -08:00
parent 7225fd5715
commit db4148a0ff

View File

@ -47,9 +47,10 @@ class Label(PositionableImpl, LayerableImpl, LockableImpl, RepeatableImpl, Annot
repetition: Optional[Repetition] = None, repetition: Optional[Repetition] = None,
annotations: Optional[annotations_t] = None, annotations: Optional[annotations_t] = None,
locked: bool = False, locked: bool = False,
identifier: Tuple = (),
) -> None: ) -> None:
LockableImpl.unlock(self) LockableImpl.unlock(self)
self.identifier = () self.identifier = identifier
self.string = string self.string = string
self.offset = numpy.array(offset, dtype=float, copy=True) self.offset = numpy.array(offset, dtype=float, copy=True)
self.layer = layer self.layer = layer
@ -62,7 +63,8 @@ class Label(PositionableImpl, LayerableImpl, LockableImpl, RepeatableImpl, Annot
offset=self.offset.copy(), offset=self.offset.copy(),
layer=self.layer, layer=self.layer,
repetition=self.repetition, repetition=self.repetition,
locked=self.locked) locked=self.locked,
identifier=self.identifier)
def __deepcopy__(self: L, memo: Dict = None) -> L: def __deepcopy__(self: L, memo: Dict = None) -> L:
memo = {} if memo is None else memo memo = {} if memo is None else memo