]> git.sesse.net Git - kdenlive/commitdiff
Fix monitor endless flicker on new document
authorJean-Baptiste Mardelle <jb@kdenlive.org>
Sun, 31 Jan 2010 22:41:28 +0000 (22:41 +0000)
committerJean-Baptiste Mardelle <jb@kdenlive.org>
Sun, 31 Jan 2010 22:41:28 +0000 (22:41 +0000)
svn path=/trunk/kdenlive/; revision=4261

src/kdenlivedoc.cpp
src/monitor.cpp

index 97467f462cc8c29b040f42dc57782435d7655b34..4c672235bb54fe085adab77461d281ee7cad1de1 100644 (file)
@@ -342,7 +342,7 @@ QDomDocument KdenliveDoc::createEmptyDocument(QList <TrackInfo> tracks)
 
     QDomElement blank0 = doc.createElement("entry");
     blank0.setAttribute("in", "0");
-    blank0.setAttribute("out", "0");
+    blank0.setAttribute("out", "1");
     blank0.setAttribute("producer", "black");
     playlist.appendChild(blank0);
 
index 88dd1aafa1de5936a6a2ebbb7deb5bbb6c05fa68..ba4e8f53d1e46849956fd727866a94d075f45be3 100644 (file)
@@ -641,7 +641,7 @@ void Monitor::rendererStopped(int pos)
 {
     if (m_currentClip != NULL && m_playAction->isChecked()) {
         // Clip monitor
-        if (pos >= m_length - 1) {
+        if (m_isActive && pos >= m_length - 1) {
             slotStart();
             return;
         }
@@ -696,7 +696,7 @@ void Monitor::start()
 
 void Monitor::refreshMonitor(bool visible)
 {
-    if (visible && render) {
+    if (visible && render && !m_isActive) {
         activateMonitor();
         render->doRefresh(); //askForRefresh();
     }
@@ -748,12 +748,13 @@ void Monitor::slotLoopZone()
 void Monitor::slotSetXml(DocClipBase *clip, QPoint zone, const int position)
 {
     if (render == NULL) return;
-    activateMonitor();
     if (clip == NULL && m_currentClip != NULL) {
         m_currentClip = NULL;
+       m_length = -1;
         render->setProducer(NULL, -1);
         return;
     }
+    if (m_currentClip != NULL) activateMonitor();
     if (clip != m_currentClip) {
         m_currentClip = clip;
         updateMarkers(clip);