Remove unused garbage

This commit is contained in:
2025-12-23 09:43:09 +01:00
parent 53549ebee9
commit 9647ae6345

View File

@@ -72,7 +72,6 @@ class VideoEditor:
# Crop adjustment settings
CROP_SIZE_STEP = 5 # pixels to expand/contract crop
CROP_MIN_SIZE = 10 # minimum crop width/height in pixels
CROP_BORDER_DETECTION_MAX_DISTANCE = 8000 # pixels - maximum distance for border hit detection
CROP_DRAG_MIN_DISTANCE = 10 # pixels - minimum drag distance before applying crop adjustment
# Motion tracking settings
@@ -158,7 +157,6 @@ class VideoEditor:
self.crop_border_drag_start_pos = None # (screen_x, screen_y) when drag started
self.crop_border_drag_start_rect = None # (x, y, w, h) in rotated coords when drag started
self.crop_border_drag_inside = None # True if drag started inside crop area, False if outside
self.crop_border_drag_outside_side = None # 'left', 'right', 'top', 'bottom' if outside
# Zoom settings
self.zoom_factor = 1.0
@@ -3128,25 +3126,12 @@ class VideoEditor:
# Check if cursor is inside crop area
inside_crop = sx1 <= x <= sx2 and sy1 <= y <= sy2
# Determine which side we're on if outside (for better contraction logic)
outside_side = None
if not inside_crop:
if x < sx1:
outside_side = 'left'
elif x > sx2:
outside_side = 'right'
elif y < sy1:
outside_side = 'top'
elif y > sy2:
outside_side = 'bottom'
if event == cv2.EVENT_LBUTTONDOWN:
# Start dragging - record position and whether we're inside/outside
self.crop_border_dragging = True
self.crop_border_drag_start_pos = (x, y)
self.crop_border_drag_start_rect = (eff_x, eff_y, eff_w, eff_h)
self.crop_border_drag_inside = inside_crop
self.crop_border_drag_outside_side = outside_side
elif event == cv2.EVENT_MOUSEMOVE and self.crop_border_dragging:
if self.crop_border_drag_start_pos and self.crop_border_drag_start_rect and self.crop_border_drag_inside is not None:
# Convert mouse movement from screen to rotated coords
@@ -3250,7 +3235,6 @@ class VideoEditor:
self.crop_border_drag_start_pos = None
self.crop_border_drag_start_rect = None
self.crop_border_drag_inside = None
self.crop_border_drag_outside_side = None
self.save_state()
# Handle crop selection (Shift + click and drag)