Skip to content

Commit

Permalink
use deep copy, as per #758 in copyData
Browse files Browse the repository at this point in the history
  • Loading branch information
benkiel authored Nov 5, 2024
1 parent 19f9ac6 commit b369eed
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Lib/fontParts/base/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,8 @@ def copyData(self: BaseObjectType, source: BaseObjectType) -> None:
if isinstance(selfValue, BaseObject):
selfValue.copyData(sourceValue)
else:
if hasattr(sourceValue, "__deepcopy__"):
sourceValue = deepcopy(sourceValue)
setattr(self, attr, sourceValue)

# ----------
Expand Down

0 comments on commit b369eed

Please sign in to comment.