Skip to content

Commit c4f33f1

Browse files
committed
Adding "Cut" action to context menus for clips and transitions
1 parent 010085a commit c4f33f1

File tree

1 file changed

+21
-3
lines changed

1 file changed

+21
-3
lines changed

src/windows/views/timeline.py

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,11 @@ def ShowClipMenu(self, clip_id=None):
590590
# Show Copy All menu (clips and transitions are selected)
591591
Copy_All = menu.addAction(_("Copy"))
592592
Copy_All.setShortcut(QKeySequence(self.window.getShortcutByName("copyAll")))
593-
Copy_All.triggered.connect(partial(self.Copy_Triggered, MenuCopy.ALL, clip_ids, tran_ids, []))
593+
Copy_All.triggered.connect(self.window.copyAll)
594+
# Show Cut All menu
595+
Cut_All = menu.addAction(_("Cut"))
596+
Cut_All.setShortcut(QKeySequence(self.window.getShortcutByName("cutAll")))
597+
Cut_All.triggered.connect(self.window.cutAll)
594598
else:
595599
# Only a single clip is selected (Show normal copy menus)
596600
Copy_Menu = StyledContextMenu(title=_("Copy"), parent=self)
@@ -632,6 +636,11 @@ def ShowClipMenu(self, clip_id=None):
632636
Copy_Menu.addMenu(Keyframe_Menu)
633637
menu.addMenu(Copy_Menu)
634638

639+
# Show Cut menu
640+
Cut_All = menu.addAction(_("Cut"))
641+
Cut_All.setShortcut(QKeySequence(self.window.getShortcutByName("cutAll")))
642+
Cut_All.triggered.connect(self.window.cutAll)
643+
635644
# Determine if the paste menu should be shown (for partial copied clip data)
636645
if has_clipboard:
637646
# Paste Menu (Only show if partial clipboard available)
@@ -2650,10 +2659,14 @@ def ShowTransitionMenu(self, tran_id=None):
26502659

26512660
# Copy Menu
26522661
if len(tran_ids) + len(clip_ids) > 1:
2653-
# Copy All Menu (Clips and/or transitions are selected)
2662+
# Show Copy All menu (clips and transitions are selected)
26542663
Copy_All = menu.addAction(_("Copy"))
26552664
Copy_All.setShortcut(QKeySequence(self.window.getShortcutByName("copyAll")))
2656-
Copy_All.triggered.connect(partial(self.Copy_Triggered, MenuCopy.ALL, clip_ids, tran_ids, []))
2665+
Copy_All.triggered.connect(self.window.copyAll)
2666+
# Show Cut All menu
2667+
Cut_All = menu.addAction(_("Cut"))
2668+
Cut_All.setShortcut(QKeySequence(self.window.getShortcutByName("cutAll")))
2669+
Cut_All.triggered.connect(self.window.cutAll)
26572670
else:
26582671
# Only a single transitions is selected (show normal transition copy menu)
26592672
Copy_Menu = StyledContextMenu(title=_("Copy"), parent=self)
@@ -2677,6 +2690,11 @@ def ShowTransitionMenu(self, tran_id=None):
26772690
Copy_Menu.addMenu(Keyframe_Menu)
26782691
menu.addMenu(Copy_Menu)
26792692

2693+
# Show Cut menu
2694+
Cut_All = menu.addAction(_("Cut"))
2695+
Cut_All.setShortcut(QKeySequence(self.window.getShortcutByName("cutAll")))
2696+
Cut_All.triggered.connect(self.window.cutAll)
2697+
26802698
# Determine if the paste menu should be shown
26812699
if has_clipboard:
26822700
# Paste Menu (Only show when partial transition clipboard available)

0 commit comments

Comments
 (0)