]> git.sesse.net Git - kdenlive/commitdiff
Fix updating of monitor timecode, solving offset between timeline and monitor timecode
authorJean-Baptiste Mardelle <jb@kdenlive.org>
Tue, 8 Nov 2011 11:02:14 +0000 (12:02 +0100)
committerJean-Baptiste Mardelle <jb@kdenlive.org>
Tue, 8 Nov 2011 11:02:14 +0000 (12:02 +0100)
src/monitor.cpp
src/monitormanager.cpp

index 50727b9cd579ca6e3a50af877829ea59bbf87993..4e017b54cd71af96380e9bdeacdbe91ca0c087aa 100644 (file)
@@ -879,7 +879,10 @@ void Monitor::resetProfile(const QString &profile)
 {
     m_timePos->updateTimeCode(m_monitorManager->timecode());
     if (render == NULL) return;
-    render->resetProfile(profile);
+    if (!render->hasProfile(profile)) {
+        activateMonitor();
+        render->resetProfile(profile);
+    }
     if (m_effectWidget)
         m_effectWidget->resetProfile(render);
 }
@@ -1003,8 +1006,8 @@ void Monitor::slotEffectScene(bool show)
         emit requestFrameForAnalysis(show);
         if (show) {
             m_effectWidget->getScene()->slotZoomFit();
-            render->doRefresh();
         }
+        render->doRefresh();
     }
 }
 
index 8d0d2341b83929e018a35c8de7f50efd1cd09201..1b0a7c6fb278400d20a2867947a0648408ea4681 100644 (file)
@@ -187,16 +187,8 @@ void MonitorManager::slotResetProfiles()
     if (m_projectMonitor == NULL || m_clipMonitor == NULL) return;
     blockSignals(true);
     QString active = m_activeMonitor ? m_activeMonitor->name() : QString();
-    if (!m_clipMonitor->render->hasProfile(KdenliveSettings::current_profile())) {
-        activateMonitor("clip");
-        m_clipMonitor->resetProfile(KdenliveSettings::current_profile());
-        m_clipMonitor->updateTimecodeFormat();
-    }
-    if (!m_projectMonitor->render->hasProfile(KdenliveSettings::current_profile())) {
-        activateMonitor("project");
-        m_projectMonitor->resetProfile(KdenliveSettings::current_profile());
-        m_projectMonitor->updateTimecodeFormat();
-    }
+    m_clipMonitor->resetProfile(KdenliveSettings::current_profile());
+    m_projectMonitor->resetProfile(KdenliveSettings::current_profile());
     if (!active.isEmpty()) activateMonitor(active);
     blockSignals(false);
     if (m_activeMonitor) m_activeMonitor->parentWidget()->raise();