File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -1098,10 +1098,16 @@ void ClipView::contextMenuEvent( QContextMenuEvent * cme )
10981098 : tr (" Copy selection" ),
10991099 [this ](){ contextMenuAction ( ContextMenuAction::Copy ); } );
11001100
1101- contextMenu.addAction (
1101+ using namespace Clipboard ;
1102+ TimePos clipPos{m_clip->startPosition ()};
1103+ TrackContentWidget *tcw = getTrackView ()->getTrackContentWidget ();
1104+ bool canPaste = tcw->canPasteSelection ( clipPos, getMimeData () );
1105+
1106+ auto pasteAction = contextMenu.addAction (
11021107 embed::getIconPixmap ( " edit_paste" ),
11031108 tr ( " Paste" ),
11041109 [this ](){ contextMenuAction ( ContextMenuAction::Paste ); } );
1110+ pasteAction->setEnabled ( canPaste );
11051111
11061112 contextMenu.addSeparator ();
11071113
You can’t perform that action at this time.
0 commit comments