From: Jean-Baptiste Mardelle Date: Mon, 3 Jan 2011 20:31:38 +0000 (+0000) Subject: Fix timeline corruption when using the "remove space" action: X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=ab38b0cc080e34742d4cdef23ee9c33dbfd76c3e;p=kdenlive Fix timeline corruption when using the "remove space" action: http://kdenlive.org/mantis/view.php?id=1960 svn path=/trunk/kdenlive/; revision=5258 --- diff --git a/src/renderer.cpp b/src/renderer.cpp index d99a2e80..b17b3693 100644 --- a/src/renderer.cpp +++ b/src/renderer.cpp @@ -1921,10 +1921,9 @@ void Render::mltInsertSpace(QMap trackClipStartList, QMap } int position = trackPlaylist.clip_start(clipIndex); int blankDuration = trackPlaylist.clip_length(clipIndex); - diff = -diff; - if (blankDuration - diff == 0) { + if (blankDuration + diff == 0) { trackPlaylist.remove(clipIndex); - } else trackPlaylist.remove_region(position, diff); + } else trackPlaylist.remove_region(position, -diff); } trackPlaylist.consolidate_blanks(0); }