]> git.sesse.net Git - kdenlive/blobdiff - src/monitormanager.cpp
Do not switch monitor when not necessary, make sure we refresh monitor when adding...
[kdenlive] / src / monitormanager.cpp
index 09c6c1e149d46f761aab230ffc147251a0c3dbed..178ffc1d1aec12e4cf3724bcbef75bde06284cc1 100644 (file)
@@ -74,12 +74,14 @@ AbstractMonitor* MonitorManager::monitor(Kdenlive::MONITORID monitorName)
     return monitor;
 }
 
-bool MonitorManager::activateMonitor(Kdenlive::MONITORID name)
+bool MonitorManager::activateMonitor(Kdenlive::MONITORID name, bool forceRefresh)
 {
     if (m_clipMonitor == NULL || m_projectMonitor == NULL)
         return false;
-    if (m_activeMonitor && m_activeMonitor->id() == name)
+    if (m_activeMonitor && m_activeMonitor->id() == name) {
+       if (forceRefresh) m_activeMonitor->start();
         return false;
+    }
     m_activeMonitor = NULL;
     for (int i = 0; i < m_monitorsList.count(); i++) {
         if (m_monitorsList.at(i)->id() == name) {