X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fmainwindow.cpp;fp=src%2Fmainwindow.cpp;h=7355b8d33b3c581b3c63947bb26d5fa55393866a;hb=09194484c415d7a7645bcf7c2245cc753059ea4c;hp=9139b6d2ec72b6ef2b6460a0131c4152f61b025a;hpb=d385077e0eab07915166924ca41d9fa807072cf0;p=kdenlive diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 9139b6d2..7355b8d3 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -1402,6 +1402,11 @@ void MainWindow::setupActions() collection.addAction("delete_timeline_clip", deleteItem); connect(deleteItem, SIGNAL(triggered(bool)), this, SLOT(slotDeleteItem())); + KAction* alignPlayhead = new KAction(i18n("Align Playhead to Mouse Position"), this); + alignPlayhead->setShortcut(Qt::Key_P); + collection.addAction("align_playhead", alignPlayhead); + connect(alignPlayhead, SIGNAL(triggered(bool)), this, SLOT(slotAlignPlayheadToMousePos())); + /*KAction* editTimelineClipSpeed = new KAction(i18n("Change Clip Speed"), this); collection.addAction("change_clip_speed", editTimelineClipSpeed); editTimelineClipSpeed->setData("change_speed"); @@ -4587,6 +4592,10 @@ void MainWindow::slotProcessImportKeyframes(GRAPHICSRECTITEM type, const QString } } +void MainWindow::slotAlignPlayheadToMousePos() +{ + m_activeTimeline->projectView()->slotAlignPlayheadToMousePos(); +} #include "mainwindow.moc"