X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fmonitormanager.cpp;h=b482a92f5e73b0649b7ff455c4d598c3aec84467;hb=8f0ae78b0d64b265aa0d99b37b019b2286d75b6e;hp=9348c9de88e1a1026d0b53c299404cf3092bcebc;hpb=a28dc9532fb0fe6f9dd07cfdb1029ce17bd98e4b;p=kdenlive diff --git a/src/monitormanager.cpp b/src/monitormanager.cpp index 9348c9de..b482a92f 100644 --- a/src/monitormanager.cpp +++ b/src/monitormanager.cpp @@ -48,8 +48,10 @@ void MonitorManager::initMonitors(Monitor *clipMonitor, Monitor *projectMonitor) 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(); @@ -60,22 +62,15 @@ void MonitorManager::activateMonitor(QString name) emit raiseClipMonitor(false); } m_activeMonitor = name; + emit checkColorScopes(); } void MonitorManager::slotSwitchMonitors(bool activateClip) { - if (m_blocked || m_clipMonitor == NULL) return; - if (!activateClip && m_clipMonitor->isActive()) { - m_clipMonitor->stop(); - m_projectMonitor->start(); - m_activeMonitor = m_projectMonitor->name(); - emit raiseClipMonitor(false); - } else if (activateClip && m_projectMonitor->isActive()) { - m_projectMonitor->stop(); - m_clipMonitor->start(); - m_activeMonitor = m_clipMonitor->name(); - emit raiseClipMonitor(true); - } + if (activateClip) + activateMonitor("clip"); + else + activateMonitor("project"); } void MonitorManager::stopActiveMonitor() @@ -163,6 +158,7 @@ void MonitorManager::slotResetProfiles() { 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(); @@ -170,6 +166,7 @@ void MonitorManager::slotResetProfiles() m_projectMonitor->resetProfile(KdenliveSettings::current_profile()); m_projectMonitor->updateTimecodeFormat(); //m_projectMonitor->refreshMonitor(true); + activateMonitor(active); }