]> git.sesse.net Git - kdenlive/commitdiff
crop left audio thumbs (needs correct scale value in line 290)
authorMarco Gittler <marco@gitma.de>
Sat, 8 Mar 2008 15:42:04 +0000 (15:42 +0000)
committerMarco Gittler <marco@gitma.de>
Sat, 8 Mar 2008 15:42:04 +0000 (15:42 +0000)
svn path=/branches/KDE4/; revision=2014

src/clipitem.cpp

index ebec5e33a5f1bf783597c3482817155e4d0a6f45..08523409899ae5111019051fd015f0546c2897c7 100644 (file)
@@ -207,6 +207,7 @@ void ClipItem::paint(QPainter *painter,
     clippath.addRect(rectInView);
 
     int startpixel = (int)(rectInView.x() - rect().x()); //start and endpixel that is viewable from rect()
+
     if (startpixel < 0)
         startpixel = 0;
     int endpixel = rectInView.width() + rectInView.x();
@@ -286,10 +287,10 @@ void ClipItem::paint(QPainter *painter,
         if (pixelForOneFrame != framePixelWidth)
             audioThumbCachePic.clear();
         emit prepareAudioThumb(pixelForOneFrame, path, startpixel, endpixel + 200);//200 more for less missing parts before repaint after scrolling
-
+        int cropLeft = (m_cropStart).frames(m_fps) * 10;
         for (int startCache = startpixel - startpixel % 100; startCache < endpixel + 300;startCache += 100) {
             if (audioThumbCachePic.contains(startCache) && !audioThumbCachePic[startCache].isNull())
-                painter->drawPixmap((int)(roundRectPathUpper.united(roundRectPathLower).boundingRect().x() + startCache), (int)(path.boundingRect().y()), audioThumbCachePic[startCache]);
+                painter->drawPixmap((int)(roundRectPathUpper.united(roundRectPathLower).boundingRect().x() + startCache - cropLeft), (int)(path.boundingRect().y()), audioThumbCachePic[startCache]);
         }
 
     }