void MonitorManager::activateMonitor(QString name)
{
- if (m_blocked || m_clipMonitor == NULL) return;
- if (m_activeMonitor == name) return;
+ if (m_blocked || m_clipMonitor == NULL || m_projectMonitor == NULL)
+ return;
+ if (m_activeMonitor == name)
+ return;
if (name == "clip") {
m_projectMonitor->stop();
m_clipMonitor->start();
emit raiseClipMonitor(false);
}
m_activeMonitor = name;
+ emit checkColorScopes();
}
-void MonitorManager::slotSwitchMonitors()
+void MonitorManager::slotSwitchMonitors(bool activateClip)
{
- if (m_blocked || m_clipMonitor == NULL) return;
- if (m_clipMonitor->isActive()) {
- m_clipMonitor->stop();
- m_projectMonitor->start();
- m_activeMonitor = m_projectMonitor->name();
- emit raiseClipMonitor(false);
- } else {
- m_projectMonitor->stop();
- m_clipMonitor->start();
- m_activeMonitor = m_clipMonitor->name();
- emit raiseClipMonitor(true);
- }
+ if (activateClip)
+ activateMonitor("clip");
+ else
+ activateMonitor("project");
}
void MonitorManager::stopActiveMonitor()
{
if (m_blocked) return;
if (m_projectMonitor == NULL || m_clipMonitor == NULL) return;
+ QString active = m_activeMonitor;
activateMonitor("clip");
m_clipMonitor->resetProfile(KdenliveSettings::current_profile());
+ m_clipMonitor->updateTimecodeFormat();
activateMonitor("project");
m_projectMonitor->resetProfile(KdenliveSettings::current_profile());
+ m_projectMonitor->updateTimecodeFormat();
//m_projectMonitor->refreshMonitor(true);
+ activateMonitor(active);
}
+void MonitorManager::slotRefreshCurrentMonitor()
+{
+ if (m_clipMonitor->isActive()) m_clipMonitor->refreshMonitor();
+ else m_projectMonitor->refreshMonitor();
+}
#include "monitormanager.moc"