@@ -1590,6 +1590,31 @@ def keyPressEvent(self, event):
1590
1590
clip_ids = [c .id for c in intersecting_clips ]
1591
1591
trans_ids = [t .id for t in intersecting_trans ]
1592
1592
self .timeline .Slice_Triggered (2 , clip_ids , trans_ids , playhead_position )
1593
+ elif key .matches (self .getShortcutByName ("sliceSelectedKeepBothSides" )) == QKeySequence .ExactMatch :
1594
+ intersecting_clips = Clip .filter (intersect = playhead_position )
1595
+ intersecting_trans = Transition .filter (intersect = playhead_position )
1596
+ if intersecting_clips or intersecting_trans :
1597
+ # Get list of clip ids
1598
+ clip_ids = [c .id for c in intersecting_clips if c .id in self .selected_clips ]
1599
+ trans_ids = [t .id for t in intersecting_trans if t .id in self .selected_transitions ]
1600
+ self .timeline .Slice_Triggered (0 , clip_ids , trans_ids , playhead_position )
1601
+ elif key .matches (self .getShortcutByName ("sliceSelectedKeepLeftSide" )) == QKeySequence .ExactMatch :
1602
+ intersecting_clips = Clip .filter (intersect = playhead_position )
1603
+ intersecting_trans = Transition .filter (intersect = playhead_position )
1604
+ if intersecting_clips or intersecting_trans :
1605
+ # Get list of clip ids
1606
+ clip_ids = [c .id for c in intersecting_clips if c .id in self .selected_clips ]
1607
+ trans_ids = [t .id for t in intersecting_trans if t .id in self .selected_transitions ]
1608
+ self .timeline .Slice_Triggered (1 , clip_ids , trans_ids , playhead_position )
1609
+ elif key .matches (self .getShortcutByName ("sliceSelectedKeepRightSide" )) == QKeySequence .ExactMatch :
1610
+ intersecting_clips = Clip .filter (intersect = playhead_position )
1611
+ intersecting_trans = Transition .filter (intersect = playhead_position )
1612
+ if intersecting_clips or intersecting_trans :
1613
+ # Get list of ids that are also selected
1614
+ clip_ids = [c .id for c in intersecting_clips if c .id in self .selected_clips ]
1615
+ trans_ids = [t .id for t in intersecting_trans if t .id in self .selected_transitions ]
1616
+ self .timeline .Slice_Triggered (2 , clip_ids , trans_ids , playhead_position )
1617
+
1593
1618
elif key .matches (self .getShortcutByName ("copyAll" )) == QKeySequence .ExactMatch :
1594
1619
self .timeline .Copy_Triggered (- 1 , self .selected_clips , self .selected_transitions )
1595
1620
elif key .matches (self .getShortcutByName ("pasteAll" )) == QKeySequence .ExactMatch :
0 commit comments