Fix issue with monitor switching

svn path=/trunk/kdenlive/; revision=4291
parent e2dfc13a
......@@ -1470,6 +1470,7 @@ void MainWindow::newFile(bool showProjectSettings, bool force)
connectDocumentInfo(doc);
connectDocument(trackView, doc);
} else m_timelineArea->setTabBarHidden(false);
m_monitorManager->activateMonitor("clip");
m_closeAction->setEnabled(m_timelineArea->count() > 1);
}
......@@ -3267,7 +3268,7 @@ QPixmap MainWindow::createSchemePreviewIcon(const KSharedConfigPtr &config)
void MainWindow::slotSwitchMonitors()
{
m_monitorManager->slotSwitchMonitors();
m_monitorManager->slotSwitchMonitors(m_clipMonitor->isActive());
if (m_projectMonitor->isActive()) m_activeTimeline->projectView()->setFocus();
else m_projectList->focusTree();
}
......
......@@ -509,7 +509,7 @@ bool Monitor::isActive() const
void Monitor::activateMonitor()
{
if (!m_isActive) {
m_monitorManager->slotSwitchMonitors();
m_monitorManager->slotSwitchMonitors(m_name == "clip");
}
}
......
......@@ -62,15 +62,15 @@ void MonitorManager::activateMonitor(QString name)
m_activeMonitor = name;
}
void MonitorManager::slotSwitchMonitors()
void MonitorManager::slotSwitchMonitors(bool activateClip)
{
if (m_blocked || m_clipMonitor == NULL) return;
if (m_clipMonitor->isActive()) {
if (!activateClip && m_clipMonitor->isActive()) {
m_clipMonitor->stop();
m_projectMonitor->start();
m_activeMonitor = m_projectMonitor->name();
emit raiseClipMonitor(false);
} else {
} else if (activateClip && m_projectMonitor->isActive()){
m_projectMonitor->stop();
m_clipMonitor->start();
m_activeMonitor = m_clipMonitor->name();
......
......@@ -51,7 +51,7 @@ public slots:
void slotStart();
void slotEnd();
void slotResetProfiles();
void slotSwitchMonitors();
void slotSwitchMonitors(bool activateClip);
private:
Monitor *m_clipMonitor;
......
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