@@ -1523,6 +1523,31 @@ def keyPressEvent(self, event):
1523
1523
clip_ids = [c .id for c in intersecting_clips ]
1524
1524
trans_ids = [t .id for t in intersecting_trans ]
1525
1525
self .timeline .Slice_Triggered (2 , clip_ids , trans_ids , playhead_position )
1526
+ elif key .matches (self .getShortcutByName ("sliceSelectedKeepBothSides" )) == QKeySequence .ExactMatch :
1527
+ intersecting_clips = Clip .filter (intersect = playhead_position )
1528
+ intersecting_trans = Transition .filter (intersect = playhead_position )
1529
+ if intersecting_clips or intersecting_trans :
1530
+ # Get list of clip ids
1531
+ clip_ids = [c .id for c in intersecting_clips if c .id in self .selected_clips ]
1532
+ trans_ids = [t .id for t in intersecting_trans if t .id in self .selected_transitons ]
1533
+ self .timeline .Slice_Triggered (0 , clip_ids , trans_ids , playhead_position )
1534
+ elif key .matches (self .getShortcutByName ("sliceSelectedKeepLeftSide" )) == QKeySequence .ExactMatch :
1535
+ intersecting_clips = Clip .filter (intersect = playhead_position )
1536
+ intersecting_trans = Transition .filter (intersect = playhead_position )
1537
+ if intersecting_clips or intersecting_trans :
1538
+ # Get list of clip ids
1539
+ clip_ids = [c .id for c in intersecting_clips if c .id in self .selected_clips ]
1540
+ trans_ids = [t .id for t in intersecting_trans if t .id in self .selected_transitons ]
1541
+ self .timeline .Slice_Triggered (1 , clip_ids , trans_ids , playhead_position )
1542
+ elif key .matches (self .getShortcutByName ("sliceSelectedKeepRightSide" )) == QKeySequence .ExactMatch :
1543
+ intersecting_clips = Clip .filter (intersect = playhead_position )
1544
+ intersecting_trans = Transition .filter (intersect = playhead_position )
1545
+ if intersecting_clips or intersecting_trans :
1546
+ # Get list of ids that are also selected
1547
+ clip_ids = [c .id for c in intersecting_clips if c .id in self .selected_clips ]
1548
+ trans_ids = [t .id for t in intersecting_trans if t .id in self .selected_transitons ]
1549
+ self .timeline .Slice_Triggered (2 , clip_ids , trans_ids , playhead_position )
1550
+
1526
1551
elif key .matches (self .getShortcutByName ("copyAll" )) == QKeySequence .ExactMatch :
1527
1552
self .timeline .Copy_Triggered (- 1 , self .selected_clips , self .selected_transitions )
1528
1553
elif key .matches (self .getShortcutByName ("pasteAll" )) == QKeySequence .ExactMatch :
0 commit comments