Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions PyReconstruct/modules/datatypes/section.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,9 @@ def getAllModifiedNames(self) -> set:
def tformsModified(self, scaling_only=False):
if len(self.tforms_values_copy) != len(self.tforms):
return True
# a renamed alignment keeps its matrix, so compare the names too
if not scaling_only and self.tforms_names_copy != list(self.tforms):
return True
for t1, t2 in zip(self.tforms_values_copy, self.tforms.values()):
if scaling_only:
if abs(t1.det - t2.det) > 1e-6:
Expand All @@ -377,6 +380,7 @@ def clearTracking(self):
self.removed_traces = []
self.modified_contours = set()
self.tforms_values_copy = [t.copy() for t in self.tforms.values()]
self.tforms_names_copy = list(self.tforms)
self.flags_modified = False

def setMag(self, new_mag : float):
Expand Down
Loading