Commit aab4f659 authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle

Merge branch 'patch5' into 'refactoring_timeline'

Remove shortcut for Insert zone in Timeline and add Icon in Clip Monitor Toolbar for Insert Zone in Project Bin

See merge request !14
parents dbea9f57 3dd5ba64
......@@ -1182,9 +1182,7 @@ void MainWindow::setupActions()
addAction(QStringLiteral("switch_trim"), i18n("Trim Mode"), this, SLOT(slotSwitchTrimMode()), QIcon::fromTheme(QStringLiteral("cursor-arrow")));
// disable shortcut until fully working, Qt::CTRL + Qt::Key_T);
addAction(QStringLiteral("insert_project_tree"), i18n("Insert Zone in Project Bin"), this, SLOT(slotInsertZoneToTree()), QIcon(), Qt::CTRL + Qt::Key_I);
addAction(QStringLiteral("insert_timeline"), i18n("Insert Zone in Timeline"), this, SLOT(slotInsertZoneToTimeline()), QIcon(),
Qt::SHIFT + Qt::CTRL + Qt::Key_I);
addAction(QStringLiteral("insert_project_tree"), i18n("Insert Zone in Project Bin"), this, SLOT(slotInsertZoneToTree()), QIcon::fromTheme(QStringLiteral("kdenlive-add-clip")) , Qt::CTRL + Qt::Key_I);
addAction(QStringLiteral("monitor_seek_snap_backward"), i18n("Go to Previous Snap Point"), this, SLOT(slotSnapRewind()),
QIcon::fromTheme(QStringLiteral("media-seek-backward")), Qt::ALT + Qt::Key_Left);
......@@ -3276,18 +3274,6 @@ void MainWindow::slotInsertZoneToTree()
pCore->projectItemModel()->requestAddBinSubClip(id, info.x(), info.y(), QString(), m_clipMonitor->activeClipId());
}
void MainWindow::slotInsertZoneToTimeline()
{
QPoint info = m_clipMonitor->getZoneInfo();
QString clipData = QString("%1#%2#%3").arg(m_clipMonitor->activeClipId()).arg(info.x()).arg(info.y());
int cid = getMainTimeline()->controller()->insertClip(-1, -1, clipData, true, true, true);
if (cid == -1) {
pCore->displayMessage(i18n("Cannot insert clip at requested position"), InformationMessage);
} else {
getMainTimeline()->controller()->seekToClip(cid, true);
}
}
void MainWindow::slotMonitorRequestRenderFrame(bool request)
{
if (request) {
......
......@@ -418,7 +418,6 @@ private slots:
void slotSetMonitorGamma(int gamma);
void slotCheckRenderStatus();
void slotInsertZoneToTree();
void slotInsertZoneToTimeline();
/** @brief The monitor informs that it needs (or not) to have frames sent by the renderer. */
void slotMonitorRequestRenderFrame(bool request);
......
......@@ -37,7 +37,6 @@
#include "timeline2/model/snapmodel.hpp"
#include "transitions/transitionsrepository.hpp"
#include "klocalizedstring.h"
#include <KDualAction>
#include <KFileWidget>
......@@ -207,6 +206,10 @@ Monitor::Monitor(Kdenlive::MonitorId id, MonitorManager *manager, QWidget *paren
m_recManager = new RecManager(this);
connect(m_recManager, &RecManager::warningMessage, this, &Monitor::warningMessage);
connect(m_recManager, &RecManager::addClipToProject, this, &Monitor::addClipToProject);
m_toolbar->addAction(manager->getAction(QStringLiteral("insert_project_tree")));
m_toolbar->setToolTip(i18n("Insert Zone to Project Bin"));
m_toolbar->addSeparator();
}
if (id != Kdenlive::DvdMonitor) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment