From: Till Theato Date: Sun, 19 Sep 2010 08:25:11 +0000 (+0000) Subject: Do not allow crop from start to get negative. This should fix a lot a problems that... X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=ebd5f85f5c5992383c9da4d08ec0671aed99309b;p=kdenlive Do not allow crop from start to get negative. This should fix a lot a problems that were created by this. I will remove all the checks for cropStart < 0 in a few weeks if this change does not introduce some new problems. svn path=/trunk/kdenlive/; revision=4906 --- diff --git a/src/abstractclipitem.cpp b/src/abstractclipitem.cpp index 6a406e45..09d837a1 100644 --- a/src/abstractclipitem.cpp +++ b/src/abstractclipitem.cpp @@ -135,13 +135,18 @@ void AbstractClipItem::resizeStart(int posx, bool hasSizeLimit) durationDiff = GenTime() - cropStart(); } else if (durationDiff >= cropDuration()) { return; - if (cropDuration() > GenTime(3, m_fps)) durationDiff = GenTime(3, m_fps); - else return; + /*if (cropDuration() > GenTime(3, m_fps)) durationDiff = GenTime(3, m_fps); + else return;*/ } m_info.startPos += durationDiff; - if (type() == AVWIDGET) + // set to true if crop from start is negative (possible for color clips, images as they have no size limit) + bool negCropStart = false; + if (type() == AVWIDGET) { m_info.cropStart += durationDiff; + if (m_info.cropStart < GenTime()) + negCropStart = true; + } m_info.cropDuration -= durationDiff; setRect(0, 0, cropDuration().frames(m_fps) - 0.02, rect().height()); @@ -159,6 +164,9 @@ void AbstractClipItem::resizeStart(int posx, bool hasSizeLimit) //kDebug()<<"// NEW START: "<