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.
This commit is contained in:
2025-12-23 09:03:55 +01:00
parent 99fbfa3201
commit 958e066042

View File

@@ -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))