From 958e0660427e5debed97e2e3b44c46e8a330d7d1 Mon Sep 17 00:00:00 2001 From: PhatPhuckDave Date: Tue, 23 Dec 2025 09:03:55 +0100 Subject: [PATCH] Update crop border dragging logic to not trigger with either Shift or Ctrl keys Modify the crop border dragging functionality in the VideoEditor class to only allow adjustments when neither the Shift nor Ctrl keys are pressed. Increase the border threshold to 800 pixels for improved user interaction during cropping. --- croppa/main.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/croppa/main.py b/croppa/main.py index a842a9f..f3912a6 100644 --- a/croppa/main.py +++ b/croppa/main.py @@ -3771,9 +3771,9 @@ class VideoEditor: self.mouse_dragging = False return - # Handle crop border dragging (only when Shift is NOT pressed) - if not (flags & cv2.EVENT_FLAG_SHIFTKEY) and self.crop_rect: - border_threshold = 10 # pixels + # Handle crop border dragging (only when Shift and Ctrl are NOT pressed) + if not (flags & cv2.EVENT_FLAG_SHIFTKEY) and not (flags & cv2.EVENT_FLAG_CTRLKEY) and self.crop_rect: + border_threshold = 800 # pixels # Get effective crop in rotated coords and map to screen eff_x, eff_y, eff_w, eff_h = self._get_effective_crop_rect_for_frame(getattr(self, 'current_frame', 0))