From 5a1e9b136092638525c1f703a6b675956ab0735c Mon Sep 17 00:00:00 2001 From: 2ManyProjects Date: Thu, 8 Jan 2026 22:43:15 -0600 Subject: [PATCH] fix --- src/stitching_scanner.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/stitching_scanner.py b/src/stitching_scanner.py index c2e43d7..d27d85f 100644 --- a/src/stitching_scanner.py +++ b/src/stitching_scanner.py @@ -525,13 +525,13 @@ class StitchingScanner: # stop_reason = 'min_dim' # break - if total_x <= -(self.config.max_mosaic_width) and direction == ScanDirection.LEFT: + if self.state.current_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) total_x ({total_x}px)") stop_reason = 'max_dim' break - if abs(total_x) >= self.config.max_mosaic_width and direction == ScanDirection.RIGHT: + if abs(self.state.current_x) >= self.config.max_mosaic_width and direction == ScanDirection.RIGHT: self.log(f"Max dimension reached ({self.config.max_mosaic_width}px)") self.log(f"Current X offset ({self.state.current_x}px)") stop_reason = 'max_dim'