Make markers copy/paste-able

This commit is contained in:
Thomas Wilshaw
2021-10-22 22:15:52 +01:00
parent 6e77606c30
commit 76e55a857f
11 changed files with 254 additions and 35 deletions
+15
View File
@@ -106,6 +106,21 @@ const int &SeekableWidget::GetScroll() const
return scroll_;
}
void SeekableWidget::CopySelected(bool cut)
{
CopyMarkersToClipboard(GetActiveTimelineMarkers());
if (cut) {
DeleteSelected();
}
}
void SeekableWidget::PasteMarkers(bool insert, rational insert_time)
{
MultiUndoCommand *command = new MultiUndoCommand();
PasteMarkersFromClipboard(timeline_points()->markers(), command, insert_time);
}
void SeekableWidget::mousePressEvent(QMouseEvent *event)
{
if (event->button() == Qt::LeftButton) {