From: Jean-Baptiste Mardelle Date: Tue, 22 Sep 2009 19:43:45 +0000 (+0000) Subject: Fix resizing issue X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=4cf170eb0dac03f8913f1a1537cbc2687164db42;p=kdenlive Fix resizing issue svn path=/trunk/kdenlive/; revision=3925 --- diff --git a/src/abstractclipitem.cpp b/src/abstractclipitem.cpp index 5bb88b98..0e422865 100644 --- a/src/abstractclipitem.cpp +++ b/src/abstractclipitem.cpp @@ -100,7 +100,7 @@ void AbstractClipItem::resizeStart(int posx, double speed) } //kDebug()<<"// DURATION DIFF: "< GenTime()) { QList collisionList = collidingItems(Qt::IntersectsItemBoundingRect); @@ -166,7 +167,7 @@ void AbstractClipItem::resizeEnd(int posx, double speed) kDebug() << "///////// CURRENT: " << startPos().frames(25) << "x" << endPos().frames(25) << ", RECT: " << rect() << "-" << pos(); kDebug() << "///////// COLLISION: " << ((AbstractClipItem *)item)->startPos().frames(25) << "x" << ((AbstractClipItem *)item)->endPos().frames(25) << ", RECT: " << ((AbstractClipItem *)item)->rect() << "-" << item->pos();*/ GenTime diff = ((AbstractClipItem *)item)->startPos() - GenTime(1, m_fps) - startPos(); - m_info.cropDuration = GenTime((int)(diff.frames(m_fps) * speed + 0.5), m_fps); + m_info.cropDuration = GenTime((int)(diff.frames(m_fps) * speed), m_fps); setRect(0, 0, cropDuration().frames(m_fps) - 0.02, rect().height()); break; } diff --git a/src/clipitem.cpp b/src/clipitem.cpp index f5fc70ad..e1f6331c 100644 --- a/src/clipitem.cpp +++ b/src/clipitem.cpp @@ -1086,10 +1086,9 @@ void ClipItem::resizeEnd(int posx, double /*speed*/) if (posx > max && maxDuration() != GenTime()) posx = max; if (posx == endPos().frames(m_fps)) return; //kDebug() << "// NEW POS: " << posx << ", OLD END: " << endPos().frames(m_fps); - const int previous = (int)(cropStart() + cropDuration()).frames(m_fps) - 1; + const int previous = cropDuration().frames(m_fps); AbstractClipItem::resizeEnd(posx, m_speed); - const int current = (int)(cropStart() + cropDuration()).frames(m_fps) - 1; - if (current != previous) { + if ((int) cropDuration().frames(m_fps) != previous) { if (m_hasThumbs && KdenliveSettings::videothumbnails()) { /*connect(m_clip->thumbProducer(), SIGNAL(thumbReady(int, QPixmap)), this, SLOT(slotThumbReady(int, QPixmap)));*/ m_endThumbTimer.start(150);