]> git.sesse.net Git - kdenlive/blobdiff - src/mainwindow.cpp
move playhead to mouse curser position if p key is pressed
[kdenlive] / src / mainwindow.cpp
index 31d181f574f657b5509222c9b5bfdc26345af20f..347a84581da29b0f4ec15263780972a27423855d 100644 (file)
@@ -1402,6 +1402,11 @@ void MainWindow::setupActions()
     collection.addAction("delete_timeline_clip", deleteItem);
     connect(deleteItem, SIGNAL(triggered(bool)), this, SLOT(slotDeleteItem()));
 
+    KAction* movePlayhead = new KAction(i18n("Move Playhead"), this);
+    movePlayhead->setShortcut(Qt::Key_P);
+    collection.addAction("move_playhead", movePlayhead);
+    connect(movePlayhead, SIGNAL(triggered(bool)), this, SLOT(slotOnPlayheadKeyPressed()));
+
     /*KAction* editTimelineClipSpeed = new KAction(i18n("Change Clip Speed"), this);
     collection.addAction("change_clip_speed", editTimelineClipSpeed);
     editTimelineClipSpeed->setData("change_speed");
@@ -4579,6 +4584,10 @@ void MainWindow::slotProcessImportKeyframes(GRAPHICSRECTITEM type, const QString
     }
 }
 
+void MainWindow::slotOnPlayheadKeyPressed()
+{
+       m_activeTimeline->projectView()->slotOnPlayheadKeyPressed();
+}
 
 #include "mainwindow.moc"