[vlmc-devel] timeline: fix collision detection under Qt5

Ludovic Fauvet git at videolan.org
Sat Mar 1 16:48:15 CET 2014


vlmc | branch: master | Ludovic Fauvet <etix at videolan.org> | Sat Mar  1 16:47:30 2014 +0100| [d1a7fe047da993e2e11f118aa7baa3ac25fbfcc8] | committer: Ludovic Fauvet

timeline: fix collision detection under Qt5

> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=d1a7fe047da993e2e11f118aa7baa3ac25fbfcc8
---

 src/Gui/timeline/TracksView.cpp |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/Gui/timeline/TracksView.cpp b/src/Gui/timeline/TracksView.cpp
index 8233838..9efb3c5 100644
--- a/src/Gui/timeline/TracksView.cpp
+++ b/src/Gui/timeline/TracksView.cpp
@@ -630,7 +630,7 @@ TracksView::findPosition( AbstractGraphicsItem *item, qint32 track, qint64 time
     if ( qgraphicsitem_cast<GraphicsEffectItem*>( item ) != NULL )
         return ItemPosition( track, time );
     // Create a fake item for computing collisions
-    QGraphicsRectItem *chkItem = new QGraphicsRectItem( item->boundingRect() );
+    QGraphicsRectItem *chkItem = new QGraphicsRectItem( item->boundingRect().adjusted( 0, 1, 0, -1 ) );
     chkItem->setParentItem( getTrack( item->trackType(), track ) );
     chkItem->setPos( time, 0 );
 



More information about the Vlmc-devel mailing list