X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fabstractclipitem.cpp;h=2583962247bbd59c935ec56dbffbfbf019e26442;hb=d2455bcfbc60918aa52a8bc9ebe30a721148c3cf;hp=39ed506de31e7d0e9780c113ae58c78f377a3022;hpb=eba492e73ecd2ccf1af379223d090a7b95a40b29;p=kdenlive diff --git a/src/abstractclipitem.cpp b/src/abstractclipitem.cpp index 39ed506d..25839622 100644 --- a/src/abstractclipitem.cpp +++ b/src/abstractclipitem.cpp @@ -44,6 +44,7 @@ AbstractClipItem::AbstractClipItem(const ItemInfo info, const QRectF& rect, doub setFlags(QGraphicsItem::ItemIsMovable | QGraphicsItem::ItemIsSelectable); #if QT_VERSION >= 0x040600 setFlag(QGraphicsItem::ItemSendsGeometryChanges, true); + setFlag(QGraphicsItem::ItemUsesExtendedStyleOption, true); #endif } @@ -124,14 +125,15 @@ void AbstractClipItem::updateRectGeometry() setRect(0, 0, cropDuration().frames(m_fps) - 0.02, rect().height()); } -void AbstractClipItem::resizeStart(int posx) +void AbstractClipItem::resizeStart(int posx, bool hasSizeLimit) { GenTime durationDiff = GenTime(posx, m_fps) - m_info.startPos; if (durationDiff == GenTime()) return; //kDebug() << "-- RESCALE DIFF=" << durationDiff.frames(25) << ", CLIP: " << startPos().frames(25) << "-" << endPos().frames(25); - if (type() == AVWIDGET && cropStart() + durationDiff < GenTime()) { - durationDiff = GenTime() - cropStart(); + if (type() == AVWIDGET) { + if (hasSizeLimit && cropStart() + durationDiff < GenTime()) + durationDiff = GenTime() - cropStart(); } else if (durationDiff >= cropDuration()) { return; if (cropDuration() > GenTime(3, m_fps)) durationDiff = GenTime(3, m_fps); @@ -271,7 +273,7 @@ void AbstractClipItem::drawKeyFrames(QPainter *painter, QRectF /*exposedRect*/) y1 = br.bottom() - i.value() * maxh; QLineF l2; while (i != m_keyframes.constEnd()) { - if (i.key() == m_selectedKeyframe) color = QColor(Qt::red); + if (i.key() == m_editedKeyframe) color = QColor(Qt::red); else color = QColor(Qt::blue); ++i; if (i == m_keyframes.constEnd() && m_keyframes.count() != 1) {