]> git.sesse.net Git - kdenlive/commitdiff
Fix timeline corruption when using 'I' or 'O' to set in / out point of a clip when...
authorJean-Baptiste Mardelle <jb@kdenlive.org>
Fri, 2 Oct 2009 11:34:19 +0000 (11:34 +0000)
committerJean-Baptiste Mardelle <jb@kdenlive.org>
Fri, 2 Oct 2009 11:34:19 +0000 (11:34 +0000)
svn path=/trunk/kdenlive/; revision=3978

src/customtrackview.cpp

index 034ec99277681d02edfdd1139bc95568896dbd88..805ab3eb2e59f40d1018bcc77c12f215bb0b1d72 100644 (file)
@@ -4476,7 +4476,7 @@ void CustomTrackView::setInPoint()
     ItemInfo startInfo = clip->info();
     ItemInfo endInfo = startInfo;
     endInfo.startPos = GenTime(m_cursorPos, m_document->fps());
-    if (endInfo.startPos >= startInfo.endPos) {
+    if (endInfo.startPos >= startInfo.endPos || endInfo.startPos < startInfo.startPos - startInfo.cropStart) {
         // Check for invalid resize
         emit displayMessage(i18n("Invalid action"), ErrorMessage);
         return;
@@ -4507,7 +4507,7 @@ void CustomTrackView::setOutPoint()
     ItemInfo startInfo = clip->info();
     ItemInfo endInfo = clip->info();
     endInfo.endPos = GenTime(m_cursorPos, m_document->fps());
-    if (endInfo.endPos <= startInfo.startPos) {
+    if (endInfo.endPos <= startInfo.startPos || endInfo.endPos > startInfo.startPos + clip->maxDuration() - startInfo.cropStart) {
         // Check for invalid resize
         emit displayMessage(i18n("Invalid action"), ErrorMessage);
         return;