Skip to content

Commit fad3a27

Browse files
committed
changed to if not is_preview:
1 parent 2b7a274 commit fad3a27

File tree

1 file changed

+7
-9
lines changed
  • mantidimaging/gui/windows/operations

1 file changed

+7
-9
lines changed

mantidimaging/gui/windows/operations/model.py

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -131,18 +131,16 @@ def apply_to_images(self, images: ImageStack, progress=None, is_preview=False) -
131131
# Run filter
132132
exec_func = self.selected_filter.execute_wrapper(**input_kwarg_widgets)
133133
exec_func.keywords["progress"] = progress
134-
exec_func(images)
135-
136-
if is_preview:
137-
return
138-
139134
params = ', '.join(f"{k}={v!r}" for k, v in exec_func.keywords.items() if k != "progress")
140-
start = datetime.now()
141-
LOG.info(f"Starting operation: {self.selected_filter.__name__} "
142-
f"(shape={images.data.shape}, {params})")
143135

136+
start = datetime.now()
137+
exec_func(images)
144138
duration = (datetime.now() - start).total_seconds()
145-
perf_logger.info(f"{self.selected_filter.filter_name} completed in {duration:.3f}s")
139+
140+
if not is_preview:
141+
LOG.info(f"Starting operation: {self.selected_filter.__name__} "
142+
f"(shape={images.data.shape}, {params})")
143+
perf_logger.info(f"{self.selected_filter.filter_name} completed in {duration:.3f}s")
146144

147145
# store the executed filter in history if it executed successfully
148146
images.record_operation(

0 commit comments

Comments
 (0)