Skip to content

Commit

Permalink
copy node.userData
Browse files Browse the repository at this point in the history
fixes #1006
  • Loading branch information
schriftgestalt committed May 20, 2024
1 parent e37d2e5 commit 4c87454
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Lib/glyphsLib/classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -2892,11 +2892,14 @@ def __init__(

def copy(self):
"""Clones the node (does not clone attributes)"""
return GSNode(
node = GSNode(
position=(self._position.x, self._position.y),
type=self.type,
smooth=self.smooth,
)
if self._userData:
node._userData = copy.deepcopy(self._userData)
return node

def __repr__(self):
content = self.type
Expand Down

0 comments on commit 4c87454

Please sign in to comment.