Only swap between tuple/list if actually necessary
This commit is contained in:
parent
07ee25e735
commit
53d2a9ca1a
@ -764,6 +764,7 @@ class Pattern:
|
||||
Returns:
|
||||
self
|
||||
"""
|
||||
if not self.locked:
|
||||
self.shapes = tuple(self.shapes)
|
||||
self.labels = tuple(self.labels)
|
||||
self.subpatterns = tuple(self.subpatterns)
|
||||
@ -777,6 +778,7 @@ class Pattern:
|
||||
Returns:
|
||||
self
|
||||
"""
|
||||
if self.locked:
|
||||
object.__setattr__(self, 'locked', False)
|
||||
self.shapes = list(self.shapes)
|
||||
self.labels = list(self.labels)
|
||||
|
Loading…
Reference in New Issue
Block a user