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:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user