Commit 7eb4f655 authored by Ludovic Fauvet's avatar Ludovic Fauvet

Do not let a clip go beyond zero

parent 17397543
...@@ -207,6 +207,7 @@ void TracksView::moveMediaItem( AbstractGraphicsMediaItem* item, QPoint position ...@@ -207,6 +207,7 @@ void TracksView::moveMediaItem( AbstractGraphicsMediaItem* item, QPoint position
} }
// Check for horizontal collisions // Check for horizontal collisions
mappedXPos = qMax( mappedXPos, (qreal)0 );
item->setPos( mappedXPos, 0 ); item->setPos( mappedXPos, 0 );
QList<QGraphicsItem*> colliding = item->collidingItems( Qt::IntersectsItemShape ); QList<QGraphicsItem*> colliding = item->collidingItems( Qt::IntersectsItemShape );
for ( int i = 0; i < colliding.size(); ++i ) for ( int i = 0; i < colliding.size(); ++i )
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment