diff --git a/src/stitching_scanner.py b/src/stitching_scanner.py index 84fe539..7442f3f 100644 --- a/src/stitching_scanner.py +++ b/src/stitching_scanner.py @@ -516,10 +516,10 @@ class StitchingScanner: stop_reason = 'timeout' break - # if current_dim() >= max_dim: - # self.log(f"Max dimension reached ({current_dim()}px)") - # stop_reason = 'max_dim' - # break + if current_dim() >= max_dim and direction == ScanDirection.RIGHT: + self.log(f"Max dimension reached ({current_dim()}px)") + stop_reason = 'max_dim' + break # if current_dim() <= 0 and direction == ScanDirection.LEFT: # self.log(f"Max dimension reached ({current_dim()}px)") # stop_reason = 'min_dim' @@ -527,7 +527,7 @@ class StitchingScanner: if total_x <= 0 and direction == ScanDirection.LEFT: self.log(f"Max dimension reached ({self.config.max_mosaic_width}px)") - self.log(f"Current X offset ({self.state.current_x}px)") + self.log(f"Current X offset ({self.state.current_x}px) total_x ({total_x}px)") stop_reason = 'max_dim' break