copy name when using Pattern.subset()
This commit is contained in:
parent
e38a530dee
commit
52adb582dc
1 changed files with 1 additions and 1 deletions
|
|
@ -87,7 +87,7 @@ class Pattern:
|
||||||
:return: A Pattern containing all the shapes and subpatterns for which the parameter
|
:return: A Pattern containing all the shapes and subpatterns for which the parameter
|
||||||
functions return True
|
functions return True
|
||||||
"""
|
"""
|
||||||
pat = Pattern()
|
pat = Pattern(name=self.name)
|
||||||
if shapes_func is not None:
|
if shapes_func is not None:
|
||||||
pat.shapes = [s for s in self.shapes if shapes_func(s)]
|
pat.shapes = [s for s in self.shapes if shapes_func(s)]
|
||||||
if subpatterns_func is not None:
|
if subpatterns_func is not None:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue