Commit 75661730 authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

Make it possible to assign shortcut to multitrack view

Fixes #229
parent 9d7abcda
Pipeline #4094 passed with stage
in 19 minutes and 21 seconds
<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
<kpartgui name="kdenlive" version="160" translationDomain="kdenlive">
<kpartgui name="kdenlive" version="161" translationDomain="kdenlive">
<MenuBar>
<Menu name="file" >
<Action name="dvd_wizard" />
......@@ -182,6 +182,7 @@
<Action name="mark_out" />
<Separator />
<Action name="monitor_fullscreen" />
<Action name="monitor_multitrack" />
<Action name="monitor_zoomin" />
<Action name="monitor_zoomout" />
<Menu name="monitor_config_overlay" ><text>Current Monitor Overlay</text>
......
......@@ -136,7 +136,6 @@ Monitor::Monitor(Kdenlive::MonitorId id, MonitorManager *manager, QWidget *paren
, m_recManager(nullptr)
, m_loopClipAction(nullptr)
, m_sceneVisibilityAction(nullptr)
, m_multitrackView(nullptr)
, m_contextMenu(nullptr)
, m_markerMenu(nullptr)
, m_loopClipTransition(true)
......@@ -490,10 +489,7 @@ void Monitor::setupMenu(QMenu *goMenu, QMenu *overlayMenu, QAction *playZone, QA
m_contextMenu->addAction(m_monitorManager->getAction(QStringLiteral("extract_frame_to_project")));
if (m_id == Kdenlive::ProjectMonitor) {
m_multitrackView =
m_contextMenu->addAction(QIcon::fromTheme(QStringLiteral("view-split-left-right")), i18n("Multitrack view"), this, SIGNAL(multitrackView(bool)));
m_multitrackView->setCheckable(true);
m_configMenu->addAction(m_multitrackView);
m_contextMenu->addAction(m_monitorManager->getAction(QStringLiteral("monitor_multitrack")));
} else if (m_id == Kdenlive::ClipMonitor) {
QAction *setThumbFrame =
m_contextMenu->addAction(QIcon::fromTheme(QStringLiteral("document-new")), i18n("Set current image as thumbnail"), this, SLOT(slotSetThumbFrame()));
......@@ -1447,9 +1443,6 @@ void Monitor::setCustomProfile(const QString &profile, const Timecode &tc)
}
slotActivateMonitor();
// render->prepareProfileReset(tc.fps());
if (m_multitrackView) {
m_multitrackView->setChecked(false);
}
// TODO: this is a temporary profile for DVD preview, it should not alter project profile
// pCore->setCurrentProfile(profile);
m_glMonitor->reloadProfile();
......
......@@ -208,7 +208,6 @@ private:
QAction *m_loopClipAction;
QAction *m_sceneVisibilityAction;
QAction *m_zoomVisibilityAction;
QAction *m_multitrackView;
QMenu *m_contextMenu;
QMenu *m_configMenu;
QMenu *m_playMenu;
......
......@@ -407,6 +407,15 @@ void MonitorManager::setupActions()
connect(projectStart, &QAction::triggered, this, &MonitorManager::slotStart);
pCore->window()->addAction(QStringLiteral("seek_start"), projectStart, Qt::CTRL + Qt::Key_Home);
QAction *multiTrack = new QAction(QIcon::fromTheme(QStringLiteral("view-split-left-right")), i18n("Multitrack view"), this);
multiTrack->setCheckable(true);
connect(multiTrack, &QAction::triggered, [&](bool checked) {
if (m_projectMonitor) {
m_projectMonitor->multitrackView(checked);
}
});
pCore->window()->addAction(QStringLiteral("monitor_multitrack"), multiTrack);
QAction *projectEnd = new QAction(QIcon::fromTheme(QStringLiteral("go-last")), i18n("Go to Project End"), this);
connect(projectEnd, &QAction::triggered, this, &MonitorManager::slotEnd);
pCore->window()->addAction(QStringLiteral("seek_end"), projectEnd, Qt::CTRL + Qt::Key_End);
......
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