@@ -103,7 +103,7 @@ def redo_next_change(self) -> None:
103
103
for ts in self .transformed_structures :
104
104
ts .redo_next_change ()
105
105
106
- def append_transformation (self , transformation , extend_collection = False , clear_redo = True ):
106
+ def append_transformation (self , transformation , extend_collection = False , clear_redo = True ) -> list [ bool ] :
107
107
"""Append a transformation to all TransformedStructures.
108
108
109
109
Args:
@@ -117,8 +117,8 @@ def append_transformation(self, transformation, extend_collection=False, clear_r
117
117
redo, the redo list should not be cleared to allow multiple redos.
118
118
119
119
Returns:
120
- list[bool]: corresponding to initial transformed structures each boolean
121
- describes whether the transformation altered the structure
120
+ list[bool]: Each list item is True if the transformation altered the structure
121
+ with the corresponding index.
122
122
"""
123
123
if self .ncores and transformation .use_multiprocessing :
124
124
with Pool (self .ncores ) as pool :
@@ -136,6 +136,9 @@ def append_transformation(self, transformation, extend_collection=False, clear_r
136
136
new_structures += new
137
137
self .transformed_structures += new_structures
138
138
139
+ # len(ts) > 1 checks if the structure has history
140
+ return [len (ts ) > 1 for ts in self .transformed_structures ]
141
+
139
142
def extend_transformations (self , transformations ):
140
143
"""Extend a sequence of transformations to the TransformedStructure.
141
144
0 commit comments