]> git.sesse.net Git - kdenlive/commitdiff
Fix playlist length: http://kdenlive.org/mantis/view.php?id=1260
authorJean-Baptiste Mardelle <jb@kdenlive.org>
Tue, 10 Nov 2009 10:12:02 +0000 (10:12 +0000)
committerJean-Baptiste Mardelle <jb@kdenlive.org>
Tue, 10 Nov 2009 10:12:02 +0000 (10:12 +0000)
svn path=/trunk/kdenlive/; revision=4104

src/renderer.cpp

index 950fb18ec5d4b614879e8941dd9b2e0cf9abf7c4..2744f6619f57fd19282b2572ca417e86bd1926b7 100644 (file)
@@ -2623,7 +2623,7 @@ bool Render::mltResizeClipEnd(ItemInfo info, GenTime clipDuration)
                 kDebug() << "/// RESIZE ERROR, NXT CLIP IS NOT BLK: " << clipIndex;
             }
         }
-    } else trackPlaylist.insert_blank(clipIndex, 0 - diff - 1);
+    } else if (clipIndex != trackPlaylist.count()) trackPlaylist.insert_blank(clipIndex, 0 - diff - 1);
     trackPlaylist.consolidate_blanks(0);
     mlt_service_unlock(service.get_service());
 
@@ -2856,7 +2856,7 @@ bool Render::mltMoveClip(int startTrack, int endTrack, int moveStart, int moveEn
                 m_isBlocked--;
                 return false;
             }
-            trackPlaylist.consolidate_blanks(1);
+            trackPlaylist.consolidate_blanks(0);
             destTrackPlaylist.consolidate_blanks(1);
             Mlt::Producer *clip;
             // check if we are moving a slowmotion producer
@@ -3502,12 +3502,12 @@ void Render::mltDeleteTrack(int ix)
             int b_track = mappedProps.value("b_track").toInt();
             if (a_track > 0 && a_track >= ix) a_track --;
             if (b_track > 0 && b_track > ix) b_track --;
-           if (b_track == ix) {
-               // transition was on the deleted track, so remove it
-               tractor.removeChild(transitions.at(i));
-               i--;
-               continue;
-           }
+            if (b_track == ix) {
+                // transition was on the deleted track, so remove it
+                tractor.removeChild(transitions.at(i));
+                i--;
+                continue;
+            }
             for (int j = 0; j < props.count(); j++) {
                 QDomElement f = props.at(j).toElement();
                 if (f.attribute("name") == "a_track") f.firstChild().setNodeValue(QString::number(a_track));